Beispiel #1
0
        public void Draw(SpriteBatch theSpriteBatch, ContentManager theContentManager)
        {
            if (MyMenuState == MenuState.Startup)
            {
                Logo.Draw(theSpriteBatch, theContentManager);
                PlayButton.Draw(theSpriteBatch, theContentManager);
                OptionsButton.Draw(theSpriteBatch, theContentManager);
                HighScoresButton.Draw(theSpriteBatch, theContentManager);
                ExitGameButton.Draw(theSpriteBatch, theContentManager);
            }
            else if (MyMenuState == MenuState.Options1)
            {
                MusicOn.Draw(theSpriteBatch, theContentManager);
                MusicOff.Draw(theSpriteBatch, theContentManager);
                SoundOn.Draw(theSpriteBatch, theContentManager);
                SoundOff.Draw(theSpriteBatch, theContentManager);
                Cheats.Draw(theSpriteBatch, theContentManager);
                Debug.Draw(theSpriteBatch, theContentManager);
                Cave1.Draw(theSpriteBatch, theContentManager);
                Cave2.Draw(theSpriteBatch, theContentManager);
                Cave3.Draw(theSpriteBatch, theContentManager);
                Back.Draw(theSpriteBatch, theContentManager);

                OptionsLabel.Draw(theSpriteBatch, theContentManager);
                MusicLabel.Draw(theSpriteBatch, theContentManager);
                SoundFXLabel.Draw(theSpriteBatch, theContentManager);
                CaveLabel.Draw(theSpriteBatch, theContentManager);
            }
        }
Beispiel #2
0
 void Start()
 {
     ThisScore = new ScoreFormat();
     ScoreName = transform.Find("Canvas/ScoreName").gameObject;
     ScoreName.GetComponent <InputField>().onEndEdit.AddListener(delegate { IsInput(ScoreName.GetComponent <InputField>()); });
     MusicVolSlider.GetComponent <Slider>().value = SaveLoad.musicVol;
     SFXVolSlider.GetComponent <Slider>().value   = SaveLoad.fXVol;
     Tips.SetActive(false);
     PauseScreen.SetActive(false);
     ScoreName.SetActive(false);
     AmmoCount = MaxAmmo;                             //set ammo
     EndUI.GetComponent <Text>().text = string.Empty; //initialised as blank to get rid of the filler text
     ExitGameButton.GetComponent <Button>().onClick.AddListener(ExitGame);
     StartCoroutine(StartAudio());                    //play music
     UpdateBarUI();
 }
Beispiel #3
0
        public void Draw(SpriteBatch theSpriteBatch, ContentManager theContentManager)
        {
            if (MyMenuState == MenuState.Startup)
            {
                Logo.Draw(theSpriteBatch, theContentManager);
                PlayButton.Draw(theSpriteBatch, theContentManager);
                OptionsButton.Draw(theSpriteBatch, theContentManager);
                HighScoresButton.Draw(theSpriteBatch, theContentManager);
                ExitGameButton.Draw(theSpriteBatch, theContentManager);
            }
            else if (MyMenuState == MenuState.Options)
            {
                MusicOn.Draw(theSpriteBatch, theContentManager);
                MusicOff.Draw(theSpriteBatch, theContentManager);
                SoundOn.Draw(theSpriteBatch, theContentManager);
                SoundOff.Draw(theSpriteBatch, theContentManager);
                Cheats.Draw(theSpriteBatch, theContentManager);
                Debug.Draw(theSpriteBatch, theContentManager);
                Mouse.Draw(theSpriteBatch, theContentManager);
                Keyboard.Draw(theSpriteBatch, theContentManager);
                Kinect.Draw(theSpriteBatch, theContentManager);
                Back.Draw(theSpriteBatch, theContentManager);

                OptionsLabel.Draw(theSpriteBatch, theContentManager);
                MusicLabel.Draw(theSpriteBatch, theContentManager);
                SoundFXLabel.Draw(theSpriteBatch, theContentManager);
                ControlsLabel.Draw(theSpriteBatch, theContentManager);
            }
            else if (MyMenuState == MenuState.Pause)
            {
                backdrop.Draw(theSpriteBatch, theContentManager);

                Resume.Draw(theSpriteBatch, theContentManager);
                MainMenu.Draw(theSpriteBatch, theContentManager);
                Quit.Draw(theSpriteBatch, theContentManager);
            }
        }
Beispiel #4
0
 private void ExitMenuItem_Click(object sender, EventArgs e)
 {
     ExitGameButton.PerformClick();
 }