【发布时间】:2015-09-30 23:27:55
【问题描述】:
在swift / SpriteKit 的游戏中,当用户退出应用并再次打开它时,我遇到了问题。如果游戏在暂停菜单上并且所有内容都已暂停,则在重新加载游戏时游戏将取消暂停,但暂停菜单上的标签不会消失。重新打开游戏时如何保持游戏暂停?我试过了
func applicationWillEnterForeground(application: UIApplication) {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
let scene = GameScene(size: CGSize(width: 2048, height: 1356))
scene.view?.paused = true
}
但这并没有做任何事情。我也试过pause(),但这把事情搞砸了。任何帮助表示赞赏。
【问题讨论】:
标签: ios iphone swift sprite-kit swift2