public void LoadScene(GAMESCENE gameScene) { switch (gameScene) { case GAMESCENE.WELCOME: SceneManager.LoadScene(0); break; case GAMESCENE.LOGINREGISTRATION: SceneManager.LoadScene(0); break; case GAMESCENE.MAINMENU: SceneManager.LoadScene(3); break; case GAMESCENE.GAME: SceneManager.LoadScene(0); break; case GAMESCENE.LOADING: SceneManager.LoadScene(0); break; case GAMESCENE.NONE: Application.Quit(); break; default: break; } }
/// <summary> /// Load scene in Game /// </summary> /// <param name="_scene"></param> public void loadScene( GAMESCENE _scene ) { switch(_scene) { //Implementation case GAMESCENE.LOGO : Application.LoadLevel("Logo"); break; case GAMESCENE.GAME : Application.LoadLevel("Nivel"); break; case GAMESCENE.MENU : Application.LoadLevel("Menu"); break; default: Application.LoadLevel("Logo"); break; } }
public void LoadSceneAsync(GAMESCENE gameScene) { Debug.Log("Enter Load Async"); asyncOperations.Clear(); int currentSceneIndex = SceneManager.GetActiveScene().buildIndex; int sceneIndex = 0; switch (gameScene) { case GAMESCENE.WELCOME: SceneManager.LoadScene(0); break; case GAMESCENE.LOGINREGISTRATION: SceneManager.LoadScene(0); break; case GAMESCENE.MAINMENU: Debug.Log("Enter Load Async SWITCH"); sceneIndex = 3; break; case GAMESCENE.GAME: sceneIndex = 2; break; case GAMESCENE.LOADING: SceneManager.LoadScene(0); break; case GAMESCENE.NONE: Application.Quit(); break; default: break; } asyncOperations.Add(SceneManager.UnloadSceneAsync(currentSceneIndex)); asyncOperations.Add(SceneManager.LoadSceneAsync(sceneIndex)); LoadingScreen(); }
public void loadSceneWithFade(GAMESCENE _scene) { Game_Fade.Instance.playFadeIn(_scene); }
public void ChangeScene(GAMESCENE s) { SceneManager.LoadSceneAsync((int)s); }
public void playFadeIn(GAMESCENE _scene) { if (Game_Actions.Instance.event_fadeIn != null) Game_Actions.Instance.event_fadeIn(); this.fadeAnim.SetTrigger("FadeIn"); this.scene = _scene; }
public void loadingScene() { Game_Director.Instance.loadScene(this.scene); this.scene = GAMESCENE.NULL; }