0

操作不在此代码中运行:

 SKAction *moveLeft = [SKAction moveToX:(-800) duration:0.6];
 SKAction *moveRight = [SKAction moveToX:(800) duration:0.6];
 [_labelLogo runAction:moveLeft];
 [_labelPlay runAction:moveRight];  

 NewYork *start = [[NewYork alloc] initWithSize:self.size];
 SKTransition *reveal = [SKTransition fadeWithColor:[UIColor clearColor] duration:2];
 reveal.pausesIncomingScene = NO;

 [self.scene.view presentScene: start transition: reveal];

如果我评论纽约切换他们工作。

4

1 回答 1

3

行动的问题 *moveLeft / *moveRight,这是因为立即开始转换到纽约场景,所以你应该等待 *moveLeft / *moveRight 像这样完成:

 SKAction *moveLeft = [SKAction moveToX:(-800) duration:0.6];
 SKAction *moveRight = [SKAction moveToX:(800) duration:0.6];
 [_labelLogo runAction:moveLeft];

 [_labelPlay runAction:moveRight completion:^{

    NewYork *start = [[NewYork alloc] initWithSize:self.size];
    SKTransition *reveal = [SKTransition fadeWithColor:[UIColor clearColor] duration:2];
    reveal.pausesIncomingScene = NO;

    [self.view presentScene:start transition:reveal];
 }];
于 2014-03-26T15:33:19.400 回答