/// <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() { // TODO: Add your initialization logic here graphics.PreferredBackBufferWidth = mWindowBounds[0]; graphics.PreferredBackBufferHeight = mWindowBounds[1]; graphics.SynchronizeWithVerticalRetrace = false; graphics.ApplyChanges(); this.IsFixedTimeStep = true; this.TargetElapsedTime = new TimeSpan(0, 0, 0, 0, 1000 / MAX_FPS); InputManager.Init(); FrameCounter.Init(); // initializing the camera with default values //mCamera.Position = new Vector2(0, 0); //mCamera.Zoom = CAMERA_ZOOM; mCamera = new Camera(new Vector2(0, 0), GraphicsDevice.Viewport.Bounds.Size, CAMERA_ZOOM); mWorld = new World(mWorldBounds); mWorld.Generate(out mRenderDebugInfo.numTilesTotal); base.Initialize(); }