public void Proceed() { Close(); HUD.instance.HideAll(); //update score GameData.instance.currentScore = mNewScore; if (GameStart.isStarted) { GameFlowController.ProgressAndLoadNextScene(); } else { //this is for test in editor if we started the scene on the level int progressInd = GameData.instance.GetProgressFromCurrentScene(); if (progressInd == -1) { if (string.IsNullOrEmpty(GameData.instance.endScene.name)) { M8.SceneManager.instance.LoadRoot(); } else { M8.SceneManager.instance.LoadScene(GameData.instance.endScene.name); } } else { M8.SceneManager.instance.LoadScene(GameData.instance.scenes[progressInd].name); } } }
IEnumerator DoLaunch() { var ctrl = GameRocketLaunchController.instance; var waitSecond = new WaitForSeconds(1f); LoLMusicPlaylist.instance.Stop(); AddConsoleText("launchSequence1"); //prep ctrl.StartPump(); while (ctrl.isPumping) { yield return(null); } AddConsoleText("launchSequence2"); //ignitions start ctrl.StartIgnition(); LoLManager.instance.PlaySound(soundRocketIgniteFirstPath, false, true); yield return(waitSecond); AddConsoleText("launchSequence3"); //start countdown yield return(waitSecond); //countdown LoLManager.instance.PlaySound(soundConsoleBeepPath, false, false); AddConsoleText("launchSequence4"); yield return(waitSecond); LoLManager.instance.PlaySound(soundConsoleBeepPath, false, false); AddConsoleText("launchSequence5"); yield return(waitSecond); LoLManager.instance.PlaySound(soundConsoleBeepPath, false, false); AddConsoleText("launchSequence6"); yield return(waitSecond); LoLManager.instance.PlaySound(soundConsoleBeepPath, false, false); AddConsoleText("launchSequence7"); yield return(waitSecond); LoLManager.instance.PlaySound(soundConsoleBeepPath, false, false); AddConsoleText("launchSequence8"); yield return(waitSecond); LoLManager.instance.PlaySound(soundConsoleBeepPath, false, false); AddConsoleText("launchSequence9"); yield return(waitSecond); AddConsoleText("launchSequence10"); //engines are go! ctrl.LiftOff(); LoLManager.instance.StopSound(soundRocketIgniteFirstPath); LoLManager.instance.PlaySound(soundRocketIgniteSecondPath, false, true); yield return(waitSecond); LoLMusicPlaylist.instance.PlayStartMusic(); AddConsoleText("launchSequence11"); //lift-off! we have a lift-off! //wait for launch to finish while (ctrl.isLiftingOff) { yield return(null); } LoLManager.instance.StopSound(soundRocketIgniteSecondPath); AddConsoleText("launchSequence12"); yield return(new WaitForSeconds(2.0f)); //go to ending if (GameStart.isStarted) { GameFlowController.ProgressAndLoadNextScene(); } else { var endScene = GameData.instance.endScene; endScene.Load(); } }
public void Progress() { GameFlowController.ProgressAndLoadNextScene(); }