/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. _spriteBatch = new SpriteBatch(GraphicsDevice); Services.AddService(typeof(SpriteBatch), _spriteBatch); GameConsoleOptions consoleOptions = new GameConsoleOptions() { ToggleKey = Keys.Insert, Padding = 10, OpenOnWrite = true, }; IConsoleCommand[] commands = new IConsoleCommand[] { new BeepCommand() }; _console = new GameConsole(this, _spriteBatch, commands, consoleOptions); InGame.LoadContent(Content, GraphicsDevice); Main.LoadContent(Content, GraphicsDevice.Viewport); HighScore.LoadContent(Content, GraphicsDevice.Viewport); #if DEBUG DebugFont = Content.Load <SpriteFont>(@"Fonts/DebugFont"); #endif }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { HighScore.Initilize(); base.Initialize(); }