Example #1
0
        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);
        }
Example #2
0
 public void StateUpdate()
 {
     if (Input.GetKeyUp(KeyCode.Space))
     {
         manager.SwitchState(new EndGameState(manager));
     }
 }
Example #3
0
 public void StateUpdate()
 {
     if (Input.GetKeyUp(KeyCode.Space))
     {
         SceneManager.LoadScene(0);
         manager.SwitchState(new BeginState(manager));
     }
 }
Example #4
0
 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
     }
 }
Example #6
0
 public void SwitchScene(int sceneIndex)
 {
     this.sceneIndex = sceneIndex;
     if (sceneIndex == 2)
     {
         manager.SwitchState(new EndGameState(manager));
         SceneManager.LoadScene(sceneIndex);
     }
 }
Example #7
0
 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));
 }