Esempio n. 1
0
        public GameConsole(Game game, SpriteBatch spriteBatch, IEnumerable<IConsoleCommand> commands, GameConsoleOptions options)
        {
            if (options.Font == null)
                throw new NullReferenceException("Please, provide SpriteFont for console font!");

            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);
        }
Esempio n. 2
0
        public GameConsole(Game game, SpriteBatch spriteBatch, IEnumerable <IConsoleCommand> commands, GameConsoleOptions options)
        {
            if (options.Font == null)
            {
                throw new NullReferenceException("Please, provide SpriteFont for console font!");
            }

            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);
        }
Esempio n. 3
0
 public GameConsole(Game game, SpriteBatch spriteBatch, GameConsoleOptions options)
     : this(game, spriteBatch, new IConsoleCommand[0], options)
 {
 }
Esempio n. 4
0
 public GameConsole(Game game, SpriteBatch spriteBatch, GameConsoleOptions options) : this(game, spriteBatch, new IConsoleCommand[0], options)
 {
 }