Glossary-Index

 

 

Absolute value 170, 184

Converts a negative number to a positive. The absolute value of -40 is 40.

Accelerometer 187, 188192, 340, 401

That cool piece of equipment in iOS devices that detects the tilt of the device. You can get tilt readings on the x, y and z axis.

Adding children 59

Add a child to a parent. For example:

CCSprite* player = [CCSprite spriteWithFile:@“player.png”];

[self addChild: player];

You can also extend the statement above to add a z depth and tag.

[self addChild: player z:1 tag: 12345];

If you move a parent object, the children would follow. If you removed a parent, the children would also be removed.

Anchor point 60

Every class derived from CCNode will have an anchorPoint property. When rotating an ...

Get iOS Game Programming with Xcode and Cocos2d now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.