Exemple #1
0
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            this.RegisterGlobalComponent(new AudioManager(this.Game, @"Content\Audio\RpgAudio.xgs", @"Content\Audio\Wave Bank.xwb", @"Content\Audio\Sound Bank.xsb"));
            _SceneManager  = new SceneManager();
            _MainMenuState = new MainMenuState();
            _PausedState   = new PausedState();
            _OptionsState  = new OptionsState();
//#if DEBUG
//            AudioManager.Instance.MusicEnabled = false;
//#endif
            // Start off in game.
            //_SceneManager.ChangeScene("BasicLevel", false);
            //StateManager.PushState(_SceneManager);
            StateManager.PushState(_MainMenuState);
            AudioManager.PlayMusic("Title1");
            AudioManager.SetMusicVolume(0.5f);
            CreateNewPlayer();
            GraphicsManager.ApplyChanges();

//#if DEBUG
            _SceneManager.AddComponent(new DebugComponent(_SceneManager));
//#endif
        }