Ejemplo n.º 1
0
 public GameConsole(Game game, SpriteBatch spriteBatch, IEnumerable<IConsoleCommand> commands, GameConsoleOptions options)
 {
     var content = new ResourceContentManager(game.Services, Resource1.ResourceManager);
     if (options.Font == null)
     {
         options.Font = content.Load<SpriteFont>("ConsoleFont");
     }
     options.RoundedCorner = content.Load<Texture2D>("roundedCorner");
     GameConsoleOptions.Options = options;
     GameConsoleOptions.Commands = commands.ToList();
     Enabled = true;
     console = new GameConsoleComponent(this, game, spriteBatch);
     game.Services.AddService(typeof(GameConsole), this);
     game.Components.Add(console);
 }
Ejemplo n.º 2
0
        public GameConsole(Game game, SpriteBatch spriteBatch, IEnumerable <IConsoleCommand> commands, GameConsoleOptions options)
        {
            var content = new ResourceContentManager(game.Services, Resource1.ResourceManager);

            if (options.Font == null)
            {
                options.Font = content.Load <SpriteFont>("ConsoleFont");
            }
            options.RoundedCorner       = content.Load <Texture2D>("roundedCorner");
            GameConsoleOptions.Options  = options;
            GameConsoleOptions.Commands = commands.ToList();
            Enabled = true;
            console = new GameConsoleComponent(this, game, spriteBatch);
            game.Services.AddService(typeof(GameConsole), this);

            game.Components.Add(console);
        }
Ejemplo n.º 3
0
 public GameConsole(Game game, SpriteBatch spriteBatch, GameConsoleOptions options)
     : this(game, spriteBatch, new IConsoleCommand[0],options)
 {
 }
Ejemplo n.º 4
0
 public GameConsole(Game game, SpriteBatch spriteBatch, GameConsoleOptions options) : this(game, spriteBatch, new IConsoleCommand[0], options)
 {
 }