public override void LoadContent() { if (!contentLoaded) { contentLoaded = true; spriteBatch = new SpriteBatch(ScreenManager.GraphicsDevice); font = ScreenManager.Content.Load<SpriteFont>("Fonts/MenuFont"); inputManager = new XnaInputManager(ScreenManager.Game, info.Game); gfx = new XnaGraphicsManager(info.Game.Width, info.Game.Height, info.Game.PixelFormat, game.Window, ScreenManager.GraphicsDevice); ScreenManager.Game.Services.AddService<Core.Graphics.IGraphicsManager>(gfx); var saveFileManager = ServiceLocator.SaveFileManager; #if WINDOWS_UWP audioDriver = new XAudio2Mixer(); #else audioDriver = new XnaAudioDriver(); #endif audioDriver.Play(); // init engines engine = info.MetaEngine.Create(info, gfx, inputManager, audioDriver, saveFileManager); engine.ShowMenuDialogRequested += OnShowMenuDialogRequested; game.Services.AddService(engine); Task.Factory.StartNew(() => { UpdateGame(); }); } }
public override void LoadContent() { if (!contentLoaded) { contentLoaded = true; spriteBatch = new SpriteBatch(ScreenManager.GraphicsDevice); font = ScreenManager.Content.Load <SpriteFont>("Fonts/MenuFont"); inputManager = new XnaInputManager(ScreenManager.Game, info.Game); gfx = new XnaGraphicsManager(info.Game.Width, info.Game.Height, info.Game.PixelFormat, game.Window, ScreenManager.GraphicsDevice); ScreenManager.Game.Services.AddService <Core.Graphics.IGraphicsManager>(gfx); var saveFileManager = ServiceLocator.SaveFileManager; #if WINDOWS_UWP audioDriver = new XAudio2Mixer(); #else audioDriver = new XnaAudioDriver(); #endif audioDriver.Play(); // init engines engine = info.MetaEngine.Create(info, gfx, inputManager, audioDriver, saveFileManager); engine.ShowMenuDialogRequested += OnShowMenuDialogRequested; game.Services.AddService(engine); Task.Factory.StartNew(() => { UpdateGame(); }); } }
public RgbIndexed8GraphicsManager(XnaGraphicsManager gfxManager) { _gfxManager = gfxManager; }
public Rgb16GraphicsManager(XnaGraphicsManager gfxManager) { _gfxManager = gfxManager; }