Esempio n. 1
0
        public void PauseGame()
        {
            ParticleSystems ps = this._mainGame.GameManager.GetComponent <ParticleSystems>();
            MusicPlayer     mp = this._mainGame.GameManager.GetComponent <MusicPlayer>();

            if (this._mainGame.IsPaused)
            {
                //unpause
                mp.UnPauseSong();
                this._mainGame.IsPaused = false;
                ps.PauseParticles(false);
            }
            else
            {
                //pause
                mp.PauseSong();
                this._mainGame.IsPaused = true;
                ps.PauseParticles(true);
            }
        }
Esempio n. 2
0
        private void MenuClick(Int32 clickedIndex)
        {
            MusicPlayer         mp     = this._mainGame.GameManager.GetComponent <MusicPlayer>();
            GameLogic           gl     = this._mainGame.GameManager.GetComponent <GameLogic>();
            IEnumerable <Track> tracks = mp.SongArchive.GetTopTen();

            if ((!this._randomNineCheck) && (!this._topTenCheck))
            {
                this._height = 500;
                switch (clickedIndex)
                {
                case 0:
                    gl.PauseGame();
                    break;

                case 1:
                    gl.PauseGame();
                    mp.NextShuffledSong();
                    break;

                case 2:
                    this._topTenCheck = true;
                    break;

                case 3:
                    this._randomNineCheck = true;
                    break;

                case 4:
                    this._mainGame.Exit();
                    break;
                }
            }
            else if (this._randomNineCheck)
            {
                mp.SetMediaPlayerShuffled(false);
                if (clickedIndex < 9)
                {
                    mp.PlaySongByIndex(this._randomNineSongs[clickedIndex]);
                }

                if (clickedIndex == 10)
                {
                    this._indexChange = false;
                    mp.PauseSong();
                }
                else if (clickedIndex == 9)
                {
                    this._height          = 350;
                    this._randomNineCheck = false;
                }
                else
                {
                    gl.PauseGame();
                }
            }
            else
            {
                if (this._topTenCheck)
                {
                    this._height      = 350;
                    this._topTenCheck = false;
                }
            }
        }