/// <summary> /// Pauses the game. This changes current BattleState to "pause" or "battle" /// and sets TimeScale to 0 or 1 respectively. /// </summary> /// <param name="gamePaused">Bool to determinate if game was paused or must be resumed</param> void Pause(bool gamePaused) { if (gamePaused) { //TimeScale and state ChangeBattleState(BattleState.pause); Time.timeScale = 0.0f; } else if (!gamePaused) { //TimeScale and state ChangeBattleState(BattleState.battle); Time.timeScale = 1.0f; } //Show or Hide Pause UI battleHud.ShowPauseHud(gamePaused); }