public FloatingIsland CreateIsland(Vector3 position, int seed, float islandScale, float radius, float topHeight, float botHeight) { FloatingIsland floatingIsland = new FloatingIsland(position, minRadius, seed, islandScale, jaggedDensity, jaggedScale, meshDensity, topHeight, botHeight); islandCreated = true; floatingIsland.CreateIsland(); return(floatingIsland); }
public void DrawMapInEditor() { MapDisplay display = FindObjectOfType <MapDisplay> (); if (drawMode == DrawMode.Gizmos) { drawGizmos = true; } else if (drawMode == DrawMode.Mesh) { drawGizmos = false; FloatingIsland editorIsland = new FloatingIsland(gameObject.transform.position, this.maxRadius, seed, islandScale, jaggedDensity, jaggedScale, meshDensity, this.maxTopHeight, this.maxBotHeight); Texture2D islandTexture = TextureGenerator.TextureFromColourMap(editorIsland.islandData.colorMap, (int)meshDensity - 1, (int)(jaggedDensity * 2f) + 1); display.DrawIslandMesh(editorIsland.islandData.meshData, islandTexture); } }