Пример #1
0
	private void CreateForest(TerrainChunk chunk) {
		PolydrawObject floor = chunk.GetFirstFloor();
		List<Vector2> points = floor.GetWorldBorderPoints();
		foreach (Vector2 point in points) {
			GameObject tree = Instantiate(treePrefab);
			tree.transform.SetParent(floor.transform);
			tree.transform.position = point;
		}
	}
Пример #2
0
	private void CreateFloorWarningSign(TerrainChunk chunk) {
		PolydrawObject floor = chunk.GetFirstFloor();
		List<Vector2> points = floor.GetWorldBorderPoints();
		Vector2 lastPoint = points.GetLast();
		Sign sign = Instantiate(signPrefab);
		sign.transform.SetParent(floor.transform);
		sign.transform.position = lastPoint;
		sign.SetAsFloorSign();
		sign.SetIcon(TerrainSetType.Flat);
	}
Пример #3
0
	private void CreateFloorArrowSign(TerrainChunk chunk) {
		PolydrawObject floor = chunk.GetFirstFloor();
		List<Vector2> points = floor.GetWorldBorderPoints();
		Vector2 lastPoint = points.GetLast();
		ArrowSign sign = Instantiate(arrowSignPrefab);
		sign.transform.SetParent(floor.transform);
		sign.transform.position = lastPoint;
		sign.SetAsFloorSign();
		sign.SetArrowDirection(nextSet.terrainSetType);
	}