public override void LoadContent() { Initialize(); // Create a new SpriteBatch, which can be used to draw textures. _spriteBatch = new SpriteBatch(ScreenManager.GraphicsDevice); if (_hud != null) { _gameFont = ContentCacheManager.GetFont(@"Fonts\GameFont"); _hud.Font = _gameFont; } base.LoadContent(); }
/// <summary> /// Load your graphics content. /// </summary> protected override void LoadContent() { // Load content belonging to the screen manager. _spriteBatch = new SpriteBatch(GraphicsDevice); _font = ContentCacheManager.GetFont("Fonts/MenuFont"); _blankTexture = ContentCacheManager.GetTexture("FragEngine.Resources.blank.png"); // Tell each of the screens to load their content. foreach (GameScreenBase screen in screens) { screen.LoadContent(); } // update the title-safe area _titleSafeArea = new Rectangle( (int)Math.Floor(GraphicsDevice.Viewport.X + GraphicsDevice.Viewport.Width * 0.05f), (int)Math.Floor(GraphicsDevice.Viewport.Y + GraphicsDevice.Viewport.Height * 0.05f), (int)Math.Floor(GraphicsDevice.Viewport.Width * 0.9f), (int)Math.Floor(GraphicsDevice.Viewport.Height * 0.9f)); }