예제 #1
0
 private void PauseControl()
 {
     if (gameHasStarted)
     {
         if (Input.GetKeyDown(Key.ESCAPE))
         {
             if (PauseManager.GetPause() == true)
             {
                 if (pausePage != null)
                 {
                     pausePage.Destroy();
                 }
                 PauseManager.UnPause();
             }
             else if (PauseManager.GetPause() == false)
             {
                 pausePage = new ContPage();
                 AddChild(pausePage);
                 Rescale(pausePage);
                 PauseManager.Pause();
             }
             else if (PauseManager.GetPause() == true && Input.GetKeyDown(Key.M))
             {
                 //Wanted to return to the menu but eh...
             }
         }
     }
 }
예제 #2
0
 void loadGame()
 {
     menuMusic.musicSoundChannel.Stop();
     MyGame.LoadGame(game);
     _button.Destroy();
     _quitbutton.Destroy();
     _contpage.Destroy();
     _contbutton.Destroy();
     _optbutton.Destroy();
     _menubg.Destroy();
     _intro.Destroy();
     _introbutton.Destroy();
     _vol0.Destroy();
     _vol20.Destroy();
     _vol40.Destroy();
     _vol60.Destroy();
     _vol80.Destroy();
     _vol100.Destroy();
     _insertpage.Destroy();
     Destroy();
 }
예제 #3
0
    void loadGame()
    {
        menuMusic.soundChannel.Stop();
        Level endless = new Level();

        game.AddChild(endless);
        _button.Destroy();
        _quitbutton.Destroy();
        _contpage.Destroy();
        _contbutton.Destroy();
        _optbutton.Destroy();
        _menubg.Destroy();
        _intro.Destroy();
        _introbutton.Destroy();
        _vol0.Destroy();
        _vol20.Destroy();
        _vol40.Destroy();
        _vol60.Destroy();
        _vol80.Destroy();
        _vol100.Destroy();
        _insertpage.Destroy();
    }