Exemple #1
0
        public GameLoop()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            //displayFPS = new DisplayFPS(this);
            //Components.Add(displayFPS);

            gameInstance = this;

            GameSettings.Initialise();
            GameSettings.ApplyChanges(ref graphics);
        }
Exemple #2
0
 public EditorLoop(IntPtr drawSurface)
 {
     _editorLoopInstance   = this;
     graphics              = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     GameSettings.Initialise();
     GameSettings.ApplyChanges(ref graphics);
     this.drawSurface = drawSurface;
     graphics.PreparingDeviceSettings += new EventHandler <PreparingDeviceSettingsEventArgs>(graphics_PreparingDeviceSettings);
     winform = (Form)Form.FromHandle(Window.Handle);
     winform.VisibleChanged += new EventHandler(EditorLoop_VisibleChanged);
     winform.Size            = new System.Drawing.Size(10, 10);
     Mouse.WindowHandle      = drawSurface;
     resizebackbuffer(MainForm.Default.GameView.Width, MainForm.Default.GameView.Height);
     winform.Hide();
 }