コード例 #1
0
    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);
    }
コード例 #2
0
    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);
    }
コード例 #3
0
    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);
    }
コード例 #4
0
    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);
    }
コード例 #5
0
    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);
    }
コード例 #6
0
    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);
    }
コード例 #7
0
    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);
    }
コード例 #8
0
 Color ColorBasic(float value, float coeff, Color cLower, Color cUpper)
 {
     return(MapColor.GetColorLerp(value, cLower, cUpper));
 }