private Color GetColorContinuousSingleBiome(Color currentColor, ExodusLocation location) { if (location._biomes[_currentBiome] > ExodusSettings.biomeCutoffContinuous) { Color pureColor = _biomeColors[_currentBiome]; currentColor = MapColor.GetColorLerp(location._biomes[_currentBiome], Color.white, pureColor); } return(currentColor); }
private Color GetColorContinuousManyBiome(Color currentColor, ExodusLocation location) { int maxIndex = location.GetMaxBiome(); if (location._biomes[maxIndex] > ExodusSettings.biomeCutoffContinuous) { Color pureColor = _biomeColors[maxIndex]; currentColor = MapColor.GetColorLerp(location._biomes[maxIndex], Color.white, pureColor); } return(currentColor); }
void ColorFlatness(MapLoc l) { Color c = MapColor.GetColorLerp(mapGen.Elevation[l.x, l.y], Color.white, Color.black); //float e = mapGen.WaterFlux[l.x, l.y]; c = mapGen.Elevation[l.x, l.y] < mapGen.seaLevel ? Color.blue : c; GameObject go = Tiles[l]; ResetTile(go); go.GetComponent <Renderer>().material.SetColor("_Color", c); }
void ColorFertility(Loc l) { Color c = MapColor.GetColorLerp(mapGen.Fertility[l.x, l.y], Color.white, Color.green); float e = mapGen.WaterFlux[l.x, l.y]; c = mapGen.Elevation[l.x, l.y] < mapGen.seaLevel ? Color.black : c; GameObject go = Tiles[l]; ResetTile(go); go.GetComponent <Renderer>().material.SetColor("_Color", c); }
void ColorNatural(MapLoc l) { GameObject go = Tiles[l]; ResetTile(go); float e = mapGen.Elevation[l.x, l.y]; float r = mapGen.WaterFlux[l.x, l.y]; Color c = MapColor.GetColorContinuous(e, cdictNatural); c = (r > mapGen.riverLevel && e > mapGen.seaLevel) ? MapColor.GetColorLerp(0.5f, Color.cyan, Color.blue) : c; //c = (r > mapGen.riverLevel && e > mapGen.seaLevel) ? Color.cyan : c; c = (mapGen.Temperature[l.x, l.y] < mapGen.iceLevel) ? Color.white : c; go.GetComponent <Renderer>().material.SetColor("_Color", c); }
static Color ColorBiome(MapGen mapGen, int x, int y) { float r = mapGen.WaterFlux[x, y]; float t = mapGen.Temperature[x, y]; float e = mapGen.Elevation[x, y]; Color orange = MapColor.GetColorLerp(0.5f, Color.red, Color.yellow); Color cr = MapColor.GetColorLerp(r, orange, Color.green); Color ct = MapColor.GetColorLerp(t, Color.black, Color.white); Color c = MapColor.GetColorLerp(0.5f, cr, ct); c = e < mapGen.seaLevel ? Color.blue : c; c = (mapGen.Temperature[x, y] < mapGen.iceLevel) ? Color.white : c; c = (mapGen.WaterFlux[x, y] > mapGen.riverLevel) && e > mapGen.seaLevel ? MapColor.GetColorLerp(0.5f, Color.blue, Color.cyan) : c; return(c); }
void ColorBiome(MapLoc l) { float r = mapGen.WaterFlux[l.x, l.y]; float t = mapGen.Temperature[l.x, l.y]; float e = mapGen.Elevation[l.x, l.y]; Color orange = MapColor.GetColorLerp(0.5f, Color.red, Color.yellow); Color cr = MapColor.GetColorLerp(r, orange, Color.green); Color ct = MapColor.GetColorLerp(t, Color.black, Color.white); Color c = MapColor.GetColorLerp(0.5f, cr, ct); c = e < mapGen.seaLevel ? Color.blue : c; c = (mapGen.Temperature[l.x, l.y] < mapGen.iceLevel) ? Color.white : c; c = (mapGen.WaterFlux[l.x, l.y] > mapGen.riverLevel) && e > mapGen.seaLevel ? MapColor.GetColorLerp(0.5f, Color.blue, Color.cyan) : c; GameObject go = Tiles[l]; ResetTile(go); go.GetComponent <Renderer>().material.SetColor("_Color", c); }
Color ColorBasic(float value, float coeff, Color cLower, Color cUpper) { return(MapColor.GetColorLerp(value, cLower, cUpper)); }