Ejemplo n.º 1
0
    public float Apply(JSONObject jsonDictionary)
    {
        if (colorGradient == null)
        {
            return(valueConverter.Convert(jsonDictionary.GetField(metricName).n));
        }
        else
        {
            Vector3 col = colorGradient.GetValue(valueConverter.Convert(jsonDictionary.GetField(metricName).n));
            switch (buildingProperty)
            {
            case BuildingProperty.Red:
                return(col.x);

            case BuildingProperty.Green:
                return(col.y);

            case BuildingProperty.Blue:
                return(col.z);
            }
            return(0);
        }
    }