I would like to know what I should use in place of
animationWithFrames:delay:
and
actionWithAnimation:restoreOriginalFrame:
since they give a warning that they've been deprecated.
Cocos2d 2.0 uses
CCAnimation
+(id) animationWithSpriteFrames:(NSArray*)frames delay:(float)delay
CCAnimate
+(id) actionWithAnimation: (CCAnimation*)anim
Docs:
http://www.cocos2d-iphone.org/api-ref/2.0.0/interface_c_c_animation.html
http://www.cocos2d-iphone.org/api-ref/2.0.0/interface_c_c_animate.html
The only change you need to do is uses the new property: restoreOriginalFrame.
Remove restoreOriginalFrame from the constructor, then, in a new line, set the property:
animation.restoreOriginalFrame = NO;
That's it!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With