For showing a number of animations sequentially in Cocos2D we use the CCSequence.
CCSequence can accept a number of actions as parameters which will be executed in sequence , ie one after another.
Here is a sample code to so this.

        /*  This action will scale my_sprite */
        id scaleTo = [CCScaleTo actionWithDuration:4 scale:1.5];
        /*This action will move the sprite from current position to this point*/
        id moveTo = [CCMoveTo actionWithDuration:1.0f
        /* This will execute all the above actions in sequence. */
	id sequence=[CCSequence actions:scaleTo,moveTo,nil];
	/* Run the above actions for your sprite */
        [my_sprite runAction:sequence];


Leave a Reply

Your email address will not be published. Required fields are marked *




Theme by HermesThemes

Copyright © 2018 CoderzHeaven. All Rights Reserved

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.