コード例 #1
0
        public void ChangeScene(Scenes _scene)
        {
            PlayState._paused = false;
            switch (_scene)
            {
                case Scenes.SPLASH:

                    _currentScene = new Splash();

                    break;
                case Scenes.MENU:

                    _currentScene = new Menu();

                    break;
                case Scenes.PLAYSTATE:

                    _currentScene = new PlayState(_graphicsDevice);

                    break;

                case Scenes.CREDITS:

                    _currentScene = new Credits();

                    break;

                case Scenes.HOWTO:

                    _currentScene = new TutorialScreen();

                    break;

                case Scenes.SCORE:
                    _currentScene = new WinScreen();
                    //();

                    break;
                case Scenes.PAUSED:
                    PlayState._paused = true;

                    break;

                case Scenes.UNPAUSED:
                    PlayState._paused = false;

                    break;

                case Scenes.SONG1:

                    Menu._song = "song1";
                    _preloader.PlayMusic( Menu._song);

                    break;
                case Scenes.SONG2:
                    Menu._song = "song2";
                    _preloader.PlayMusic(Menu._song);

                    break;
                case Scenes.SONG3:
                    Menu._song = "song3";
                    _preloader.PlayMusic(Menu._song);

                    break;
                case Scenes.SONG4:
                    Menu._song = "song4";
                    _preloader.PlayMusic(Menu._song);

                    break;
                case Scenes.SONG5:
                    Menu._song = "song5";
                    _preloader.PlayMusic(Menu._song);

                    break;
                case Scenes.MUSIC:

                    Menu _tempMenu = _currentScene as Menu;
                    _tempMenu.DisplayMusicRequest(true);

                    break;
            }
        }
コード例 #2
0
 public void SetGraphicsDevice(GraphicsDevice _graphicsDevice)
 {
     this._graphicsDevice = _graphicsDevice;
     _me._graphicsDevice = _graphicsDevice;
     _currentScene = new Splash();
 }