Difference between paused property of SKScene and SKView

爱⌒轻易说出口 提交于 2019-12-03 06:13:09
Andrey Gordeev

Pausing SKView stops calling update: method for SKScene.

Pausing SKScene doesn't do that.

I usually pause both SKScene and SKView

EDIT:

As of iOS9 pausing the scene will pause the update: method.

The effect is the same. You still have the paused property on the scene because it's a subclass of SKNode and the scene may need to be paused during transitions, either through the SKView setting that controls whether scenes are paused during transitions or manually.

I would wager that pausing the view would also be able to "freeze" a currently running transition, which is about the only thing you can't pause by pausing the scene(s) alone.

Therefore pausing the view may also pause all internal timers and draw calls, so a paused view may be better to conserve battery, though that's a guess based on how cocos2d handles a paused director vs paused scene.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!