嘿所有我有一个Spritekit动画,我想在用户赢得关卡时触发。这就是我所拥有的
if([[other name] isEqualToString:@"win"])
{
NSLog(@"WE HAVE WON THE LEVEL");
[bomb removeFromParent];
[self saveUserInfo];
[[self view] performSelector:@selector(presentScene:) withObject:[LevelSelectScene scene] afterDelay:2];
}
在从父母移除炸弹后,我该怎样接近动画?
答案 0 :(得分:0)
- (void)gameOver
{
[self runAction:[SKAction sequence:@[[SKAction runBlock:^{
[bomb removeFromParent];
[self yourAnimation];
[self saveUserInfo];
}] ,[SKAction waitForDuration:yourDelay], [SKAction runBlock:^{
GameOverScene *gameOverScene = [GameOverScene sceneWithSize:self.size];
[self.view presentScene:gameOverScene transition:[SKTransition pushWithDirection:SKTransitionDirectionLeft duration:0.5]];
}]]]];
}