Пример #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // Create the camera
            camera = new FPSCamera(this, new Vector3(0, 5, 0));

            // TODO: use this.Content to load your game content here
        }
Пример #2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // Create the camera
            camera = new FPSCamera(this, new Vector3(0, 5, 0));

            // TODO: use this.Content to load your game content here
            // Build the terrain
            Texture2D heightmap = Content.Load <Texture2D>("heightmap");

            terrain          = new Terrain(this, heightmap, 10f, Matrix.Identity);
            camera.HeightMap = terrain;
        }