Documentation says that parent SKView object has a paused property. Set it to YES to pause the scene.
Paused
A
Booleanvalue that indicates whether the view’s scene animations are paused.@property(getter=isPaused, nonatomic) BOOL paused
Discussion If the value is YES, then the scene’s content is fixed on screen. No actions are executed and no physics simulation is performed."
//the parent SKView
spriteView =(SKView*) self.view;//pause button-(IBAction)goPauseButton {if(!spriteView.paused){
spriteView.paused = YES;}else{
spriteView.paused = NO;}}文章標籤
全站熱搜
