SKScene becomes unresponsive while being Idle

后端 未结 1 1623
感动是毒
感动是毒 2021-01-16 13:47

Hello I have a SceneKit game. All the game play is in one scene and when the game is over the sprit kit overlay acts as a game over screen and when they hit play again the s

相关标签:
1条回答
  • 2021-01-16 13:59

    is your SceneKit scene playing ? A scene is playing when you either have

    • scene.playing = YES
    • SCNAction instances running
    • implicit or explicit animations running

    The SpriteKit scene overlay is refreshed only when the SceneKit scene is. So if the SceneKit scene does not redisplay the actions set in the overlay might not run.

    A solution might be to set the playing property or to add actions to SceneKit objects instead of SpriteKit objects.

    This is unrelated but try to keep away from timers. SceneKit provides several game loop callbacks that will allow you to do what you want.

    0 讨论(0)
提交回复
热议问题