public IEnumerator MonsterWins() { yield return(new WaitForSeconds(0.5f)); currentScene = Enums.Scene.WIN_MONSTER; SceneManager.LoadScene((int)Enums.Scene.WIN_MONSTER); }
public IEnumerator PlayersWin() { yield return(new WaitForSeconds(0.5f)); currentScene = Enums.Scene.WIN_PLAYERS; SceneManager.LoadScene((int)Enums.Scene.WIN_PLAYERS); }
// Update is called once per frame void Update() { if (Input.anyKeyDown && currentScene == Enums.Scene.TITLE_SCREEN) { currentScene = Enums.Scene.MENU; StartCoroutine("StartAnimation"); } else if (Input.GetButtonDown("Confirm") && currentScene == Enums.Scene.MENU) { playerOrder = selectPlayers.playerOrder; currentScene = Enums.Scene.GAMEPLAY; SceneManager.LoadScene((int)Enums.Scene.GAMEPLAY); } else if (Input.GetButtonDown("Confirm") && (currentScene == Enums.Scene.WIN_PLAYERS || currentScene == Enums.Scene.WIN_MONSTER)) { currentScene = Enums.Scene.TITLE_SCREEN; SceneManager.LoadScene((int)Enums.Scene.TITLE_SCREEN); } }