Wednesday, April 2, 2014

Deprecated API in v0.7.1 Cocos2D



New functions - v0.7.1 cocos2D


1. Add


[self add:node];        // OLD
[self addChild:node];   // NEW

[self add:node z:0];          // OLD
[self addChild:node z:0];     // NEW

[self add:node z:0 tag:t];          // OLD
[self addChild:node z:0 tag:t];     // NEW

[self add:node z:0 tag:t parallaxRatio];        // OLD
[self addChild:node z:0 tag:t parallaxRatio];   // NEW

2. Get

[self getByTag:tag];        // OLD
[self getChildByTag:tag];   // NEW

3. Remove

[self remove:node];                    // OLD
[self removeChild:node cleanup:NO];    // NEW

[self removeAndStop:node];                  // OLD
[self removeChild:node cleanup:YES];        // NEW

[self removeByTag:tag];                    // OLD
[self removeChildByTag:tag cleanup:NO];    // NEW

[self removeAndStopByTag:tag];              // OLD
[self removeChildByTag:tag cleanup:YES];    // NEW

[self removeAll];                           // OLD
[self removeAllChildrenWithCleanup: NO];    // NEW

[self removeAndStopAll];                    // OLD
[self removeAllChildrenWithCleanup: YES];    // NEW

4. Actions


[self do: action];          // OLD
[self runAction: action];   // NEW

No comments:

Post a Comment