public scene(List<gameObject> gameObjects, List<Obstacle> obstacleList, stateGame gameState) { this.gameObjects = gameObjects; this.obstacleList = obstacleList; this.gameState = gameState; this.sceneControl = sceneControler.next; }
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; } }
private void goToScene(stateGame gameState) { for (int i = 0; i < scenes.Count; i++) { if (scenes[i].gameState == gameState) { scenes[i].endScene = false; sceneIndex = i; break; } } }