Exemplo n.º 1
0
        /// <summary>
        /// Create the pause menu
        /// </summary>
        private void CreatePauseMenu()
        {
            _pauseMenu = new PauseMenu(ref _window, AssetManager.LoadSound("ShiftThroughMenu"), AssetManager.LoadSound("ShiftThroughMenu"));
            _pauseMenu.AddMenuSelectionAction();
            var gameWorld = GameWorld;

            _pauseMenu.SetWorld(ref gameWorld);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Pause the game
 /// </summary>
 public static void Pause()
 {
     if (IsMainMenuOpen)
     {
         return;
     }
     GameWorld?.Pause();
     if (_isAlreadyPaused == false)
     {
         _pauseMenu?.AddMenuSelectionAction();
         _isAlreadyPaused = true;
     }
     IsGamePaused = true;
 }