I got a turn based game, where objects move around the game board. This movement takes time, about 0.4 seconds per move. I would like to disable further touches on the scene until my object reaches its destination and I get to perform calculations for the new position.
I tried using boolean animation flags, but it seems that they are either ignored or are unreliable.
[selectedModel runAction:[SKAction moveTo:[MapOfTiles positionForTileCoord:s.position] duration:0.75] completion:^{
[self animateNextMove];
if(reachedDestination)
{
isAnimatingMove = NO;
}
}];
I noticed that overlaying a transparent SpriteNode with user interaction set to NO seems to still capture touches (I was planning on adding a transparent overlay and setting it's user interaction on/off to capture touches.
What is the best way to disable buttons and touches on nodes while Sprite Kit performs some animation?