public void SwitchScene(int sceneIndex) { this.sceneIndex = sceneIndex; if (sceneIndex == 0) { manager.SwitchState(new BeginState(manager)); } else if (sceneIndex == 1) { manager.SwitchState(new PlayState(manager)); } SceneManager.LoadScene(sceneIndex); }
public void StateUpdate() { if (Input.GetKeyUp(KeyCode.Space)) { manager.SwitchState(new EndGameState(manager)); } }
public void StateUpdate() { if (Input.GetKeyUp(KeyCode.Space)) { SceneManager.LoadScene(0); manager.SwitchState(new BeginState(manager)); } }
public void StateUpdate() { if (Input.GetKeyUp(KeyCode.Space)) { SceneManager.LoadScene(1); // 1 es el gameScene manager.SwitchState(new PlayState(manager)); } }
public void StateUpdate() { if (gData.galaxyIsGenerated && gameData.CivsGenerated) // if all parameters are ready to load { Application.LoadLevel("GalaxyMap"); manager.SwitchState(new GalaxyMapState(manager)); // and change the state manager to the beginning state } }
public void SwitchScene(int sceneIndex) { this.sceneIndex = sceneIndex; if (sceneIndex == 2) { manager.SwitchState(new EndGameState(manager)); SceneManager.LoadScene(sceneIndex); } }
public void SwitchScene(int sceneIndex) { this.sceneIndex = sceneIndex; if (sceneIndex == 1) { Debug.Log("Entramos al Juego"); manager.SwitchState(new PlayState(manager)); SceneManager.LoadScene(sceneIndex); } }
void Switch() { if (!valuesLoaded) { GrabUIValues(); valuesLoaded = true; } Debug.Log("Moving to loading galaxy..."); LoadNextLevel(); // test manager.SwitchState(new SetupState(manager)); // holds the level load until completed (test) }
void Switch() { Debug.Log("Setting up the galaxy"); Application.LoadLevelAsync("NewGameScreen"); manager.SwitchState(new NewGameState(manager)); }