상속: Core.Graphics.IGraphicsManager, IDisposable
예제 #1
0
        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();
                });
            }
        }
예제 #2
0
        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();
                });
            }
        }
예제 #3
0
 public RgbIndexed8GraphicsManager(XnaGraphicsManager gfxManager)
 {
     _gfxManager = gfxManager;
 }
예제 #4
0
 public Rgb16GraphicsManager(XnaGraphicsManager gfxManager)
 {
     _gfxManager = gfxManager;
 }
예제 #5
0
 public RgbIndexed8GraphicsManager(XnaGraphicsManager gfxManager)
 {
     _gfxManager = gfxManager;
 }
예제 #6
0
 public Rgb16GraphicsManager(XnaGraphicsManager gfxManager)
 {
     _gfxManager = gfxManager;
 }