Esempio n. 1
0
 public CubeEngineGame()
 {
     graphics = new GraphicsDeviceManager(this);
     debug = new DebugManager(this, "Font/Arial", true);
     debug.Console.Execute("clr.AddReference(\"CubeEngine\")");
     debug.Console.Execute("from CubeEngine import *");
     debug.Console.AddObject("game", this);
     Content.RootDirectory = "Content";
 }
Esempio n. 2
0
        /// <summary>
        /// Initializes the DebugSystem and adds all components to the game's Components collection.
        /// </summary>
        /// <param name="game">The game using the DebugSystem.</param>
        /// <param name="debugFont">The font to use by the DebugSystem.</param>
        /// <returns>The DebugSystem for the game to use.</returns>
        public DebugManager(Game game, string debugFont, bool luaConsole)
        {
            instance = this;

            // Create all of the system components
            DebugResourceManager = new DebugResourceManager(game, debugFont);
            game.Components.Add(DebugResourceManager);

            Console = new Console(game, DebugResourceManager, luaConsole);
            game.Components.Add(Console);

            DebugDisplay = new DebugDisplay(game);
            game.Components.Add(DebugDisplay);

            TimeRuler = new TimeRuler(game);
            game.Components.Add(TimeRuler);

            Logger.Initialize(game);
        }