void BringUpStopGameCanvas(GameStopType type) { anime.SetBool("InGame", false); if (type == GameStopType.Die) { stopGameTitle.text = string.Concat(Player_Movement.instance.GetPlayerRemainingLife().ToString() + " life remaining"); anime.SetTrigger("ShowTitle"); } else if (type == GameStopType.NextLevel) { stopGameTitle.text = string.Concat("Congratulations, moving on to Level " + (GameManager_LevelSettings.instance.GetCurrentLevel() + 1).ToString()); anime.SetTrigger("ShowTitle"); } else if (type == GameStopType.Finish) { stopGameTitle.text = "Game Over"; anime.SetTrigger("StopGame"); } }
public void GamePause(GameStopType type) { if (type == GameStopType.Die) { bool stillAlive = Player_Movement.instance.IsPlayerStillAliveAfterThisDeath(); if (!stillAlive) { gameState = GameState.GameOver; if (StopGame != null) { StopGame(GameStopType.Finish); } } else { gameState = GameState.Menu; if (StopGame != null) { StopGame(type); } StartCoroutine(DelayRestart()); } } else if (type == GameStopType.NextLevel) { gameState = GameState.Menu; if (StopGame != null) { StopGame(type); } StartCoroutine(CurrentLevelComplete()); } else if (type == GameStopType.Finish) { gameState = GameState.Menu; if (StopGame != null) { StopGame(type); } } }
void BackToPool(GameStopType end) { GameObjectPool.instance.ItemBackToPool(this.gameObject); }