How to reuse actions
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/16
15:20 UTC
Read the original article
Hit count: 173
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