public scene(List<gameObject> gameObjects, List<Obstacle> obstacleList, stateGame gameState) { this.gameObjects = gameObjects; this.obstacleList = obstacleList; this.gameState = gameState; this.sceneControl = sceneControler.next; }
private void Start() { if (sceneControl == null) { DontDestroyOnLoad(gameObject); sceneControl = this; } else { Destroy(sceneControl); } }
public scene(List<gameObject> gameObjects, List<Obstacle> obstacleList, stateGame gameState, sceneControler sceneControl) { this.gameObjects = gameObjects; this.obstacleList = obstacleList; this.gameState = gameState; if((sceneControl == sceneControler.next) || (sceneControl == sceneControler.previous)) { this.sceneControl = sceneControl; } else { this.sceneControl = sceneControler.next; } }