Exemplo n.º 1
0
Arquivo: Game1.cs Projeto: iosys/mps
        private float zoomStep, panStep; // Snelheid van SpriteManager.Camera

        #endregion Fields

        #region Constructors

        public Game1(MPSForm form)
        {
            this.form = form;
            System.Windows.Forms.Form xnaWindow = (System.Windows.Forms.Form)System.Windows.Forms.Control.FromHandle((Window.Handle));
            xnaWindow.GotFocus += xnaWindow_GotFocus;
            form.Panel.Resize += Panel_Resize;
            graphics = new GraphicsDeviceManager(this);
            graphics.PreparingDeviceSettings += graphics_PreparingDeviceSettings;
            graphics.PreferredBackBufferWidth = form.Panel.Width;
            graphics.PreferredBackBufferHeight = form.Panel.Height;
            Content.RootDirectory = "Content";
        }
Exemplo n.º 2
0
Arquivo: Program.cs Projeto: iosys/mps
 static void Main()
 {
     Application.EnableVisualStyles();
     MPSForm form = new MPSForm();
     form.Disposed += form_Disposed;
     using (game = new Game1(form))
     {
         form.Show();
         form.TopMost = true;
         game.Run();
     }
 }