示例#1
0
 public GameConsole(Game game, SpriteBatch spriteBatch, GameConsoleOptions options) 
 {
     if (options.Font == null)
     {
         options.Font = game.Content.Load<SpriteFont>("ConsoleFont");
     }
     options.RoundedCorner = game.Content.Load<Texture2D>(@"Textures/roundedCorner");
     GameConsoleOptions.Options = options;
     Enabled = true;
     console = new GameConsoleComponent(this, game, spriteBatch);
     game.Services.AddService(typeof(GameConsole), this);
     game.Components.Add(console); 
 }
示例#2
0
 public GameConsole(Game game, SpriteBatch spriteBatch, GameConsoleOptions options)
 {
     if (options.Font == null)
     {
         options.Font = game.Content.Load <SpriteFont>("ConsoleFont");
     }
     options.RoundedCorner      = game.Content.Load <Texture2D>(@"Textures/roundedCorner");
     GameConsoleOptions.Options = options;
     Enabled = true;
     console = new GameConsoleComponent(this, game, spriteBatch);
     game.Services.AddService(typeof(GameConsole), this);
     game.Components.Add(console);
 }