/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { Mouse.SetCursor(MouseCursor.Crosshair); _frameRate = new SmartFramerate(5); base.Initialize(); }
public Root() { graphics = new GraphicsDeviceManager(this); this.gameScene = new GameScene(); const int padding = 16; this.gameScene.Bounds.X = padding; this.gameScene.Bounds.Y = padding; this.graphics.PreferredBackBufferWidth = (this.gameScene.Bounds.Height + padding * 2) * 1920 / 1080; this.graphics.PreferredBackBufferHeight = this.gameScene.Bounds.Height + padding * 2; this.smartFramerate = new SmartFramerate(5); /*this.graphics.SynchronizeWithVerticalRetrace = false; * this.IsFixedTimeStep = true; * this.TargetElapsedTime = TimeSpan.FromMilliseconds(1000.0f / 60); * this.graphics.SynchronizeWithVerticalRetrace = true;*/ this.Content.RootDirectory = "Content"; GContent = this.Content; }