Esempio n. 1
0
		public AwesomeGame()
		{
			graphics = new GraphicsDeviceManager(this)
			{
				PreferredBackBufferWidth = 800,
				PreferredBackBufferHeight = 600
			};
			Content.RootDirectory = "Content";

			//graphics.IsFullScreen = true;
			
			this.Services.AddService(typeof(ContentManager), Content);

			//create the camera and add it as a service
			camera = new Camera();
			this.Services.AddService(typeof(Camera), camera);

			//this.Components.Add(new Terrain.SimpleTerrain(this, 8, @"Terrain\Textures\grass"));
			_terrain = new Terrain.SimpleTerrain(this, @"Terrain\Textures\level1_heightmap", @"Terrain\Textures\level1_texture", @"Terrain\Textures\level1_gameobjects");
			_terrain.collidable = false;
			this.Services.AddService(typeof(Terrain.SimpleTerrain), _terrain);		//make terrain available as a service.

			_barrel = new Mesh(this, @"Models\Barrel", Matrix.CreateTranslation(new Vector3(10.0f, 0.0f, 10.0f)));

			// Get some sort of checkpoint based course going on
			course = new Course(this);
			this.Services.AddService(typeof(Course), course);

			//this.Components.Add(new Physics.ParticleSystem(this, @"Physics\Cone.xml", new Vector3(0,200,0)));
			if (Environment.MachineName != "BARNEY-DESKTOP")
			{
				_sunlight = new Sunlight(this);
				_shadowMap = new ShadowMap(this);
			}

			_availableCars = new List<string>();
			_availableCars.Add("Less Blocky Car 2");
			_availableCars.Add("Curvy Car");
			_availableCars.Add("Police Car");
			_availableCars.Add("Schoolbus");
			_availableCars.Add("Trike");
		}
Esempio n. 2
0
		public NormalMap(SimpleTerrain terrain)
		{
			_terrain = terrain;
		}