Only the last node moves when multiple nodes are called for action

Posted by Kriem on Stack Overflow See other posts from Stack Overflow or by Kriem
Published on 2010-05-15T17:19:15Z Indexed on 2010/05/15 17:24 UTC
Read the original article Hit count: 175

Filed under:
|
|

Of the three parts I want to move, only the last one actually moves. I can't seem to "recycle" the ease action I created.

How is this done the correct way?

- init
{    
    // initial setup

    [self moveParts];
}

- (void)moveParts
    {
        id action = [CCMoveBy    actionWithDuration:1 position:ccp(0,160)];
        id ease   = [CCEaseInOut actionWithAction:action];

        [part1 runAction:ease];
        [part2 runAction:ease];
        [part3 runAction:ease];
    }

© Stack Overflow or respective owner

Related posts about cocos2d-iphone

Related posts about animation