Apologize for another newbie question: I'm trying to rotate a sprite inside ccTouchesBegan using tags and want it to stop on ccTouchEnded, how do I stop my action?
Here's my code inside ccTouchesBegan:
PlayerShip * ship = (PlayerShip *)[self getChildByTag:TAG_PLAYERSHIP];
id myRotAction = [RotateBy actionWithDuration:12 angle:-360];
Action * RepeatAction = [RepeatForever actionWithAction: myRotAction];
RepeatAction.tag = TAG_ACTION_ROTATELEFT;
[ship runAction: RepeatAction];
How should I stop the rotation inside ccTouchEnded? The code below doesn't seem to work:
PlayerShip * ship = (PlayerShip *)[self getChildByTag:TAG_PLAYERSHIP];
[ship stopActionByTag: TAG_ACTION_ROTATELEFT];
Thanks in advance! :)