I can pause the game I have created no problem while I'm in the app. However, when I try and call the pause function I have created in the applicationWillResignActive
function in App Delegate, it doesn't work, at all. So this is my code that I am trying to use in my App Delegate File.
func applicationWillResignActive(_ application: UIApplication) {
GamePlayScene.instance.isPaused = true
print("Game is Paused")
}
The print
Statement gets called so I know the function is getting called. However, the game still stays active. I'm trying to call the same isPaused
function that I am using in my GamePlayScene
.
One thing that works is if I just use the normal pause feature in SpriteKit but, I can't find a way to resume the game after I open the app. For example, I can use this.
func applicationWillResignActive(_ application: UIApplication) {
pause()
print("Game is Paused")
}
This seems to work, but the whole app just opens up frozen and there is no way to keep going. What do y'all think?