Ejemplo n.º 1
0
        protected override void Initialize()
        {
            log.Info("Initializing game engine...");

            base.Initialize();

            DebugCommandUI.RegisterCommand("toggle-debug", "Turn debug mode on or off", CoreCommands.ToggleDebugCommand);
            DebugCommandUI.RegisterCommand("toggle-sound", "Turn sound on or off", CoreCommands.ToggleSoundCommand);
            RegisterConsoleCommands();
        }
Ejemplo n.º 2
0
        public static void Initialize(Game g)
        {
            _debugManager = new DebugManager(g);
            g.Components.Add(_debugManager);

            _debugCommandUI           = new DebugCommandUI(g);
            _debugCommandUI.DrawOrder = int.MaxValue;
            g.Components.Add(_debugCommandUI);

            _fpsCounter = new FpsCounter(g);
            g.Components.Add(_fpsCounter);

            _memTracker = new MemoryTracker(g);
            g.Components.Add(_memTracker);

            _currentRuler = new TimeRuler(g);
            g.Components.Add(_currentRuler);

            _timeHistory = new TimeHistory(g, _currentRuler);
            g.Components.Add(_timeHistory);
        }
Ejemplo n.º 3
0
        protected override void LoadContent()
        {
            renderer.LoadContent();

            GameDataLoader.LoadContent(Content);

            base.LoadContent();

            LevelEditor = new Editor.Editor(this);

            eventAggregationManager.AddListener(new GoreFactory(this), true);
            eventAggregationManager.AddListener(new SpawnPlayersHandler(this), true);
            eventAggregationManager.AddListener(new StartGameHandler(this), true);
            eventAggregationManager.AddListener(new CheckGameStateHandler(this), true);
            eventAggregationManager.AddListener(new ShootHandler(this), true);
            eventAggregationManager.AddListener(new PowerupPickedUpHandler(this), true);

            eventAggregationManager.SendMessage(new StartGameMessage());

            DebugCommandUI = new DebugCommandUI(this, DefaultFont);
            Components.Add(DebugCommandUI);
        }
Ejemplo n.º 4
0
 private void RegisterConsoleCommands()
 {
     DebugCommandUI.RegisterCommand("toggle-edit", "Turn level editor mode on or off", LevelEditor.ToggleEditModeCommand);
 }