protected bool GetBool(object value, float zoom) { if (value is bool) { return((bool)value); } if (value is IDictionary) { Stop <bool> s1, s2; float t; int count = Stop <bool> .GetActiveStops(value, zoom, out s1, out s2, out t); if (count == 1) { return(s1.value); } return(s1.value); } return(false); }
protected float GetFloat(object value, float zoom) { if (value is double) { return((float)(double)value); } if (value is IDictionary) { Stop <float> s1, s2; float t; int count = Stop <float> .GetActiveStops(value, zoom, out s1, out s2, out t); if (count == 1) { return(s1.value); } return(Mathf.Lerp(s1.value, s2.value, t)); } return(1); }
protected Color GetColor(object value, float zoom) { if (value is string) { return(GetColorFromString((string)value)); } if (value is IDictionary) { Stop <string> s1, s2; float t; int count = Stop <string> .GetActiveStops(value, zoom, out s1, out s2, out t); if (count == 1) { return(GetColorFromString(s1.value)); } return(Color.Lerp(GetColorFromString(s1.value), GetColorFromString(s2.value), t)); } Debug.Log("GetColor error"); return(Color.red); }