【发布时间】:2014-02-05 00:18:06
【问题描述】:
我有一个 sprite-kit 游戏,我需要经常检查玩家是否输了
- (void)update:(NSTimeInterval)currentTime
{
for (SKSpriteNode *sprite in self.alienArray ) {
if (sprite.position.y < 10) {
LostScene *lostScene = [[LostScene alloc] initWithSize: CGSizeMake(CGRectGetWidth(self.view.bounds), CGRectGetHeight(self.view.bounds))];
NSLog(@"about to present");
[self.view presentScene:lostScene transition:[SKTransition fadeWithDuration:0.5]];
}
}
}
但是当这个方法被调用时(我知道正在发生),没有场景出现。我究竟做错了什么?我相信它与过渡有关,因为当我将其取出时,它可以正常工作
【问题讨论】:
-
然后
about to present被调用了?
标签: ios iphone xcode ios7 sprite-kit