![]() |
cocos2d-iphone
2.1
Improved Cocos2D API Reference (iOS version) for www.kobold2d.com developers
|
#import <CCParallaxNode.h>
Public Member Functions | |
(void) | - addChild:z:parallaxRatio:positionOffset: |
Protected Attributes | |
ccArray * | _parallaxArray |
CGPoint | _lastPosition |
Properties | |
ccArray * | parallaxArray |
CCParallaxNode: A node that simulates a parallax scroller
The children will be moved faster / slower than the parent according the the parallax ratio.
- (void) addChild: | (CCNode *) | node | |
z: | (NSInteger) | z | |
parallaxRatio: | (CGPoint) | c | |
positionOffset: | (CGPoint) | positionOffset | |
Adds a child to the container with a z-order, a parallax ratio and a position offset It returns self, so you can chain several addChilds.
- (ccArray*) parallaxArray [read, write, assign] |
array that holds the offset / ratio of the children