private void UpdateNextRound() { //gameState = (levelChanger.currLevel == 0) ? GameStates.WaitingToStart : GameStates.Playing; levelReached = (nextLevelToLoad == levelReached) ? levelReached += 1 : levelReached; nextLevelToLoad = (nextLevelToLoad == levelChanger.maxLevel) ? nextLevelToLoad = 0 : nextLevelToLoad = levelChanger.currLevel + 1; //if (nextLevelToLoad == levelReached) //{ // levelReached += 1; //} //nextLevelToLoad += 1; Debug.Log("ShouldChange"); //nextLevelToLoad > levelChanger.maxLevel ? levelChanger.ChangeToLevel(0) : levelChanger.ChangeToLevel(nextLevelToLoad); levelChanger.ChangeToLevel(nextLevelToLoad); }
IEnumerator EndGameSceneEnumeratior() { yield return(new WaitForSeconds(timeToWait)); levelChanger.ChangeToLevel(0); }
public void GoBackToMainMenu() { levelChanger.ChangeToLevel(0); }
void StartGame() { levelChanger.ChangeToLevel(1); gameController.gameState = GameStates.Playing; }