public TerrainDemoGame() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; IsMouseVisible = true; #if WINDOWS_PHONE graphics.PreferredBackBufferWidth = 800; graphics.PreferredBackBufferHeight = 480; TargetElapsedTime = TimeSpan.FromTicks(333333); graphics.IsFullScreen = true; #else graphics.PreferredBackBufferWidth = 1024; graphics.PreferredBackBufferHeight = 768; #endif // Create the chase camera camera = new ChaseCamera(); Services.AddService(typeof (ICameraService), camera); // Set the camera offsets //camera.DesiredPositionOffset = new Vector3(0.0f, 2000.0f, 3500.0f); //camera.LookAtOffset = new Vector3(0.0f, 150.0f, 0.0f); camera.DesiredPositionOffset = new Vector3(0.0f, 20.0f, 35.0f); camera.LookAtOffset = new Vector3(0.0f, 1.5f, 0.0f); // Set camera perspective camera.NearPlaneDistance = 1.0f; camera.FarPlaneDistance = 10000.0f; //TODO: Set any other camera invariants here such as field of view terrain = new TerrainComponent(this, @"Terrain\HeightMap"); }
public Ship(GraphicsDevice device, TerrainComponent terrain) { graphicsDevice = device; _terrain = terrain; }