Using SpriteKit, I have created a sprite, and would like to display the sprite, pause for a second, then begin the animation using a new sprite.
Currently, I am using
self.neko = [SKSpriteNode spriteNodeWithImageNamed:@"Awake.ico"];
[self addChild:self.neko];
sleep(2);
[self.neko removeFromParent];
Based on the code provided, you would think the sprite would be drawn, then the thread would sleep for a couple of seconds, and then remove the sprite from the parent.... but the sprite is not being shown.
If I remove the removeFromParent line, the sprite will remain on the screen.
So the question is this, am i doing it correctly?
Is there a way to force the sprite to be updated on the scene before the sleep timer is executed?