internal void GenBiome(TerrainType biome, TerrainCollection terrains) { foreach (HexCell c in cells) { if (!c.IsUnderwater) { Terrain t = terrains.SelectTerrain(c, biome); c.Elevation = t.elevation; c.TerrainTypeIndex = t.terrainTypeIndex; c.WaterLevel = t.waterLevel; c.SetterrainType(t.name); } } foreach (HexCell c in cells) { c.CalcNeighborDistance(); } }
protected WorldBase() { Places = new PlaceCollection(); Terrain = new TerrainCollection(this); }
// Use this for initialization void Start() { terrains = GetComponent <TerrainCollection>(); terrains.Setup(); }