O'Reilly logo

iOS Game Programming with Xcode and Cocos2d by Justin Dike

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required