예제 #1
0
파일: Menus.cs 프로젝트: dknoma/ultraviolet
    /************************
    * Menu related methods *
    ************************/

    protected void MenuChecking()
    {
        if (GameMaster.IsPaused())
        {
            if (Input.GetButtonDown(ControllerInputManager.Pause()) /*|| Input.GetButtonDown(ControllerInputManager.Weapons())*/)
            {
                unpause();
            }
        }
        else if (!GameMaster.IsPaused() && !GameMaster.PlayerTransitionState())
        {
            pause();
        }
    }
예제 #2
0
파일: Menus.cs 프로젝트: dknoma/ultraviolet
 /*
  * Pauses the game
  */
 private void pause()
 {
     if (Input.GetButtonDown(ControllerInputManager.Pause()))
     {
         mainPause = true;
         createMenu(pauseMenuBG);
         GameMaster.getCurrentSong().Pause();                //hard pause will stop the music
         GameMaster.PlayPauseSFX();
         GameMaster.PauseCheck(true);
         Time.timeScale = 0; //sets the game's timescale to 0, effectively pausing the game
     }                       /* else if (Input.GetButtonDown(ControllerInputManager.Weapons())) {
                              *     mainPause = false;
                              *     weaponPause = true;
                              *     createMenu(weaponsMenu);
                              *
                              *     GameMaster.PlayPauseSFX();				//music stil plays to keep the flow of the game going
                              *     GameMaster.PauseCheck(true);			//useful for weapon select menus
                              *     Time.timeScale = 0;
                              * }*/
 }