In my game, I am using SKAction repeatActionForever:
method to periodically call some method with performSelector:
. As I seen, there is no way to stop this. I tried to stop via removeActionForKey:
or removeAllActions
- no results. I don't want to call this action recursively , so I need help.
UPDATE: My SKAction code
levelTimer=[SKAction repeatActionForever:[SKAction sequence:@[[SKAction waitForDuration:30.0],[SKAction performSelector:@selector(moveToNextLevel) onTarget:self]]]];
[self runAction:levelTimer withKey:@"levelTimerAction"];