Hi I want to add a title or label that says Get Ready and when you tap it you start spawning custom sprites. Does any one know how to do this. As a reference I want the Get ready screen to act like Flappy Birds or Splashy Fish. Anywhere I can get info on this?
How to add a Get Ready screen in spritekit
105 views Asked by user3431313 At
2
There are 2 answers
0
On
SKSpriteNode *getReady = [SKSpriteNode spriteNodeWithImageNamed:@"myImage.png"];
//remember to set position and other custom stuff here
[self addChild:getReady];
_isFirst = YES; //BOOL property
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
if (_isFirst)
{
SKAction *fadeOut = [SKAction fadeOutWithDuration:10];
[getReady runAction:fadeOut];
_isFirst = NO;
} else {
//other time you tap, code here
}
}
You need to creat a SKSpriteNode with the image you want and add to your scene.
Then when the user tap you can run an action to fade it out.
Also, I think you would be great if you check out some tutorials, cause that's really basic stuff. I'm sure you can easily find then.