나는 SKAction(); 나는 게임에서 spirenodes일시 중지 게임 WillResignActive
func pause(){
if(isGamePaused)
isGamePaused = false;
world.paused = false;
} else {
isGamePaused = true;
world.paused = true;
}
}
자사의 애니메이션을 일시 정지 버튼을 눌러하지만 배경에 갈 때 나는 게임을 일시 중지 할 수 없습니다 경우 그들은 이름을 세계
와 자녀의 sknode의이다
NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("goBG:"), name: UIApplicationWillResignActiveNotification, object: nil);
func goBG(sender: AnyObject){
self.isGamePaused = true;
self.world.paused = true;
println("bg"); // called
println(world.paused);// return true
}
SpriteKit 자동으로 배경에 때 앱 움직임을 일시 중지하고 응용 프로그램이 활성화되면 다시 시작합니다. – 0x141E