示例#1
0
        // GET api/<controller>/5
        public HeightMapModel Get(int id)
        {
            var world = WorldController.MapModels.SingleOrDefault(x => x.Id == id);
            var map   = HeightMapModel.Create(world);

            var terrainTypes = TerrainType.GetTypes();

            map.CompositeTerrainTile = new Link
            {
                Href = _resourceLinker.GetContent <ResourceController>(action => action.CompositeTile(id)),
                Rel  = "TileTexture"
            };

            return(map);
        }