ios - Reset scene in SpriteKit -
 I already have two different view controllers in one with a     Yes, make a method that creates a scene in the first place and remembers it if you If there are things that are close, then remove them from the parents before returning their visual creation method.    Example:    In the same reason you are looking at your phantom because you can not remove it from the scene when you restart it, since you probably should completely rebuild your view, you will see all the objects Should be removed from the scene and then call your "startNewGame" method again.    Example of extracting all objects from the scene:   SKScene  Find the game and points with the "Play again" button in the second game. When the game is over, then I remove that scene and my problem is that when I click on the "code" and  init  again, when the user clicks on "replay" If after the game has ended, and after resetting it, a fixed  SKSpriteNode  was rotated, when I go back to that scene, before removing the view it will be at the same angle Is rotated.  -initWithSize  is called correctly, so I'm not sure why this is happening. My question is if there is a way to reset  SKScene  This is like the first game played. Thanks!    
 - (id) initWithSize: (CGSize) size {{super initWithSize: size]; [Self-nudegame]; Self return; } - (Zero) startNewGame {// Configure All Your View Here} - (Zero) Buttons CallOnStartClick on [[Game of Self-Beginning]; }    for 
 (SKNode * node. Children themselves) {[node removal head]; }    
 
Comments
Post a Comment