Beispiel #1
0
 public GameState(DoomTacticsGame gameInstance, SquidInputManager squidInputManager)
 {
     GameInstance = gameInstance;
     Desktop = new DoomDesktop();
     SquidInputManager = squidInputManager;
     _stateMachine = new StateMachine(new MatchIntroState(this));
 }
        protected override void LoadContent()
        {
            MusicManager.Initialize(Content);
            MusicManager.SetMusic(_enableMusic);
            SoundManager.Initialize(Content);
            SoundManager.SetPlaySound(_enableSound);
            MessagingSystem.Subscribe(SoundManager.OnPlaySound, DoomEventType.PlaySound, "soundsystem", null);

            _desktop = new DoomDesktop() { Name = "desk" };
            _inputManager = new SquidInputManager(this);
            var menuState = new MenuState(this, _inputManager, _desktop);
            _stateMachine = new StateMachine(menuState);
        }