本文整理汇总了C#中Building.RemoveTrees方法的典型用法代码示例。如果您正苦于以下问题:C# Building.RemoveTrees方法的具体用法?C# Building.RemoveTrees怎么用?C# Building.RemoveTrees使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Building
的用法示例。
在下文中一共展示了Building.RemoveTrees方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
// Use this for initialization
void Start ()
{
Map = new GameMap();
Map.TerrainData = LowPolyTerrainData.GetRandomMap();
var building = new Building();
building.Positions.Add(new Vector2Int(6, 1));
building.Positions.Add(new Vector2Int(7, 1));
building.Positions.Add(new Vector2Int(8, 1));
building.Positions.Add(new Vector2Int(9, 1));
building.Positions.Add(new Vector2Int(10, 1));
building.Positions.Add(new Vector2Int(11, 1));
building.Positions.Add(new Vector2Int(12, 1));
building.Positions.Add(new Vector2Int(13, 1));
building.Positions.Add(new Vector2Int(14, 1));
building.Positions.Add(new Vector2Int(11, 2));
building.Positions.Add(new Vector2Int(12, 2));
building.Positions.Add(new Vector2Int(12, 3));
building.Positions.Add(new Vector2Int(13, 3));
building.Positions.Add(new Vector2Int(13, 4));
building.Positions.Add(new Vector2Int(14, 4));
building.Positions.Add(new Vector2Int(14, 5));
building.Positions.Add(new Vector2Int(15, 5));
building.RemoveTrees(Map.TerrainData);
//Map.Buildings.Add(building);
building = new Building();
//building.Positions.Add(new Vector2Int(6, 2));
building.Positions.Add(new Vector2Int(7, 2));
building.Positions.Add(new Vector2Int(8, 2));
building.Positions.Add(new Vector2Int(9, 2));
building.Positions.Add(new Vector2Int(10, 2));
building.Positions.Add(new Vector2Int(5, 3));
building.Positions.Add(new Vector2Int(6, 3));
building.Positions.Add(new Vector2Int(7, 3));
building.Positions.Add(new Vector2Int(8, 3));
building.Positions.Add(new Vector2Int(9, 3));
building.Positions.Add(new Vector2Int(10, 3));
building.Positions.Add(new Vector2Int(11, 3));
//building.Positions.Add(new Vector2Int(5, 4));
building.Positions.Add(new Vector2Int(6, 4));
building.Positions.Add(new Vector2Int(7, 4));
building.Positions.Add(new Vector2Int(8, 4));
building.Positions.Add(new Vector2Int(9, 4));
building.Positions.Add(new Vector2Int(10, 4));
building.Positions.Add(new Vector2Int(11, 4));
building.Positions.Add(new Vector2Int(10, 6));
building.Positions.Add(new Vector2Int(11, 6));
building.Positions.Add(new Vector2Int(12, 6));
building.Type = "house";
building.RemoveTrees(Map.TerrainData);
//Map.Buildings.Add(building);
building = new Building();
var floor = new BuildingFloor();
floor.Positions.Add(new Vector2Int(13, 2));
floor.Positions.Add(new Vector2Int(14, 2));
floor.Positions.Add(new Vector2Int(15, 2));
floor.Positions.Add(new Vector2Int(16, 2));
floor.Positions.Add(new Vector2Int(14, 3));
floor.Positions.Add(new Vector2Int(15, 3));
floor.Positions.Add(new Vector2Int(16, 3));
floor.WallEdges.Add(new WallEdge(new Vector2Int(13, 2), 2));
floor.WallEdges.Add(new WallEdge(new Vector2Int(13, 2), 0));
floor.BaseHeight = 20.0f;
floor.FloorHeight = 0.2f;
floor.Height = 10.0f;
floor.Map = Map;
building.Floors.Add(floor);
floor = new BuildingFloor();
floor.Positions.Add(new Vector2Int(14, 2));
floor.Positions.Add(new Vector2Int(15, 2));
floor.Positions.Add(new Vector2Int(16, 2));
floor.Positions.Add(new Vector2Int(14, 3));
floor.Positions.Add(new Vector2Int(15, 3));
floor.Positions.Add(new Vector2Int(16, 3));
floor.WallEdges.Add(new WallEdge(new Vector2Int(14, 2), 2));
floor.WallEdges.Add(new WallEdge(new Vector2Int(15, 2), 2));
floor.BaseHeight = 30.0f;
floor.FloorHeight = 0.2f;
floor.Height = 10.0f;
floor.Map = Map;
building.Floors.Add(floor);
floor = new BuildingFloor();
floor.Positions.Add(new Vector2Int(15, 4));
floor.Positions.Add(new Vector2Int(16, 4));
floor.Positions.Add(new Vector2Int(17, 4));
floor.Positions.Add(new Vector2Int(17, 3));
floor.Positions.Add(new Vector2Int(18, 3));
floor.WallEdges.Add(new WallEdge(new Vector2Int(15, 4), 0));
//.........这里部分代码省略.........