示例#1
0
        protected override void LoadContent()
        {
            _terrainModel = Game.Content.Load <TerrainModel>(_terrainModelAssetName);
            _terrainModel.Initialize(_camera, GraphicsDevice);

            if (_terrainModel.Effect is BasicEffect)
            {
                BasicEffect effect = (BasicEffect)_terrainModel.Effect;
                effect.Texture        = Game.Content.Load <Texture2D>("terrain");
                effect.TextureEnabled = true;
            }

            base.LoadContent();
        }
示例#2
0
        protected override void LoadContent()
        {
            _terrainModel = Game.Content.Load<TerrainModel>(_terrainModelAssetName);
            _terrainModel.Initialize(_camera, GraphicsDevice);

            if (_terrainModel.Effect is BasicEffect)
            {
                BasicEffect effect = (BasicEffect) _terrainModel.Effect;
                effect.Texture = Game.Content.Load<Texture2D>("terrain");
                effect.TextureEnabled = true;
            }

            base.LoadContent();
        }