/// <summary> /// Unpauses the game /// </summary> public void UnPause() { if (ActiveGame.Breakout == activeGame) { MakeActiveCanvas(Canvases.BreakoutGame); } Time.timeScale = 1.0f; GlobalPauseState = PauseState.Unpaused; //MakeActiveCanvas(Canvases.BreakoutGame); CursorManager.ChangeCursorState(CursorLockMode.Locked); }
/// <summary> /// Call to display win or loss text /// </summary> /// <param name="activeGame">The arcade game currently being played</param> /// <param name="winLose">Weather the game was won or lost. True = won, false = lost</param> public void OnWinLose(ActiveGame activeGame, bool winLose) { if (true == winLose) { WinLoseResultDisplayText.text = BREKOUT_WIN_TEXT; Pause(); MakeActiveCanvas(Canvases.BreakoutWinLose); CursorManager.ChangeCursorState(CursorLockMode.None); } else if (false == winLose) { WinLoseResultDisplayText.text = BREKOUT_LOSE_TEXT; Pause(); MakeActiveCanvas(Canvases.BreakoutWinLose); CursorManager.ChangeCursorState(CursorLockMode.None); } else { throw new System.Exception("Game was neither won or lost. This should be impossible to reach"); } }