I want to stop an action once my sprite gets to a certain rotation. For example:
CCAction *rotateUp = [CCRotateTo actionWithDuration:0.3 angle:-35];
[player runAction:rotateUp];
if (player.rotation == -35) {
[player stopAction:rotateUp];
[player runAction:[CCRotateTo actionWithDuration:0.5 angle:65]];
}
Once the player gets to the max rotation I want it to run a different action. But this isn't working. What can I do instead?