Esempio n. 1
0
        public override void Initialize()
        {
            InitializeScreens();
            base.Initialize();
            m_virtualScreen = new VirtualScreen(1320, 720, Camera.GraphicsDevice);
            Game.Window.ClientSizeChanged += Window_ClientSizeChanged;
            Game.Deactivated += PauseGame;
            var form = Control.FromHandle(Game.Window.Handle) as Form;

            if (form != null)
            {
                form.MouseCaptureChanged += PauseGame;
            }
            Camera.GraphicsDevice.DeviceReset += ReinitializeContent;
        }
Esempio n. 2
0
 public override void Initialize()
 {
     this.InitializeScreens();
     base.Initialize();
     this.m_virtualScreen = new VirtualScreen(1320, 720, base.Camera.GraphicsDevice);
     base.Game.Window.ClientSizeChanged += new EventHandler<EventArgs>(this.Window_ClientSizeChanged);
     base.Game.Deactivated += new EventHandler<EventArgs>(this.PauseGame);
     Form form = Control.FromHandle(base.Game.Window.Handle) as Form;
     if (form != null)
     {
         form.MouseCaptureChanged += new EventHandler(this.PauseGame);
     }
     base.Camera.GraphicsDevice.DeviceReset += new EventHandler<EventArgs>(this.ReinitializeContent);
 }