void OnValidate() { if (lacunarity < 1) { lacunarity = 1; } if (octaves < 0) { octaves = 0; } fallMap = FallGenerator.GenerateFall(worldPartSize); }
public void RendWorld() { WorldStats worldStats = GenerateWorld(Vector2.zero); WorldDisplay display = FindObjectOfType <WorldDisplay>(); if (drawMode == DrawMode.NoiseWorld) { display.DrawTexture(Texturing.TextureFromHeightMap(worldStats.heightWorld)); } else if (drawMode == DrawMode.ColourWorld) { display.DrawTexture(Texturing.TextureFromColourMap(worldStats.colourWorld, worldPartSize, worldPartSize)); } else if (drawMode == DrawMode.Mesh) { display.DrawMesh(MeshGenerator.GenerateTerrainMesh(worldStats.heightWorld, meshHeightMultiplier, meshHeightCurve, ValueLevelOfDetail), Texturing.TextureFromColourMap(worldStats.colourWorld, worldPartSize, worldPartSize)); } else if (drawMode == DrawMode.FallMap) { display.DrawTexture(Texturing.TextureFromHeightMap(FallGenerator.GenerateFall(worldPartSize))); } }
void Awake() { fallMap = FallGenerator.GenerateFall(worldPartSize); }