Adding tweens to the pause menu
Now that we have finished the main menu, let’s continue adding tweens to the pause menu:
- Go ahead and open up our Gameplay scene. Update the
PauseScreenBehaviour
script to have the following implementation ofSetPauseMenu
:/// <summary> /// Will turn our pause menu on or off /// </summary> /// <param name="isPaused">is the game currently /// paused</param> public void SetPauseMenu(bool isPaused) { paused = isPaused; /* If the game is paused, timeScale is 0, otherwise 1 */ Time.timeScale = (paused) ? 0 : 1; ...