I would like to move a sprite by ccp(x,y). While the sprite is moving, I sometimes need it to move by ccp(P,Q) additionally.
How can I achieve that?
Things like:
id action1 = [CCMoveBy actionWithDuration: 2 position: ccp(-80,0)];
id action2 = [CCMoveBy actionWithDuration: 2 position: ccp(80,80)];
[sp runAction: action1];
[sp runAction: action2];
do not seem to work: The first action is ignored completely.
Grouping the actions did not work, either:
id spawn = [CCSpawn actions: action1, action2, nil];
[sprite runAction: spawn];