/// <summary> /// Initalize the game /// </summary> protected override void Initialize() { base.Initialize(); ship = new Ship(GraphicsDevice); // Set the camera aspect ratio // This must be done after the class to base.Initalize() which will // initialize the graphics device. camera.AspectRatio = (float)graphics.GraphicsDevice.Viewport.Width / graphics.GraphicsDevice.Viewport.Height; // Perform an inital reset on the camera so that it starts at the resting // position. If we don't do this, the camera will start at the origin and // race across the world to get behind the chased object. // This is performed here because the aspect ratio is needed by Reset. UpdateCameraChaseTarget(); camera.Reset(); }