Difference between paused property of SKScene and SKView

前端 未结 2 1646
我寻月下人不归
我寻月下人不归 2021-02-08 14:04

I am pausing my SKScene using the following code:

self.paused = YES;

However, according to this answer by Andrey Gordeev, one can also pause a

2条回答
  •  闹比i
    闹比i (楼主)
    2021-02-08 14:05

    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.

提交回复
热议问题