Beispiel #1
0
        IEnumerator WaitForEnd()
        {
            StateController.Instance.ChangeState(States.GAME_WAIT);
            bool isGameEnd = CheckForEndGame();

            if (isGameEnd)
            {
                SoundController.Instance.SetSfx(fimDaPartida);
                yield return(new WaitForSeconds(endGameWaitTime));

                DuelEndgame.winner       = WinnerName();
                DuelEndgame.winnerPoints = WinnerPlayer();
                if (WinnerName() == "Corisco")
                {
                    Core.ChangeScene.MainMenu.LoadByName(cutsceneCorisco.ToString());
                }
                else
                {
                    Core.ChangeScene.MainMenu.LoadByName(cutsceneAntonio.ToString());
                }
            }
            else
            {
                SoundController.Instance.SetSfx(fimDeTurno);
                yield return(new WaitForSeconds(endWaitTime));

                ResetGame();
            }
        }
Beispiel #2
0
 /*public void StartMinigame()
  * {
  *  Core.ChangeScene.MainMenu.StartMinigame(current.currentMinigameID);
  * }*/
 public void StartMinigame(AllScenes scene)
 {
     LeanTween.pauseAll();
     Core.ChangeScene.MainMenu.LoadByName(scene.ToString());
 }
Beispiel #3
0
 public void ChangeSceneByDefault()
 {
     Core.ChangeScene.MainMenu.LoadByName(sceneToChange.ToString());
 }
Beispiel #4
0
 public void ChangeScene(AllScenes scene)
 {
     Core.ChangeScene.MainMenu.LoadByName(scene.ToString());
 }