4
\$\begingroup\$

I am new to Cocos2D and following this tutorial.

I want to animate a CCSprite with the genie effect that OS X uses for hiding windows to the dock and showing them again.

Here's an example from an iOS library:

example effect

How can I do this in Cocos2D?

\$\endgroup\$
  • 1
    \$\begingroup\$ Please do not cross-post questions in the future. I've flagged your SO question for deletion, since this site is probably the more topical one. \$\endgroup\$ – Josh Jul 17 '13 at 13:42
-1
\$\begingroup\$

Use ccsprite with ccbadgenode in order fire number of frame of spite with moveto postion can change each frame interval with time .cccallfuntion is

-(void)playStarAnimation
{
    Animation *anim = [Animation node];
    sp = [anim playAnimCCSpriteWithFileName:@"STARS~ipad" frameName:@"STARS" Layer:physicsLayer From:1 To:42 Delay:1.0/20.0 Loop:4 Position:CGPointMake(512, 750) TAG:STARS_ANIM];        
}

CCSequence *seq5 = [CCSequence actions:[CCDelayTime actionWithDuration:5.3],
        [CCCallFunc actionWithTarget:self selector:@selector(playStarAnimation)], nil];
[self runAction:seq5];
\$\endgroup\$
  • 1
    \$\begingroup\$ Use ccsprite with ccbadgenode in order fire number of frame of spite with moveto postion can change each frame interval with time .cccallfuntion is Please take the time to reword this into something a bit more readable. \$\endgroup\$ – ClassicThunder Aug 23 '14 at 19:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.