//Color - UI public static IXTween ToColor(this Graphic target, float?r, float?g, float?b, float?a, float time, IEasing easing = null, bool realTime = false) { XColorHash hash = XColorHash.New; if (r != null) { hash.AddRed((float)r); } if (g != null) { hash.AddRed((float)g); } if (b != null) { hash.AddRed((float)b); } if (a != null) { hash.AddRed((float)a); } return(XTween.ToColor <Graphic>(target, "color", hash, time, easing, realTime)); }
//Color - Property public static IXTween ToColor <T>(this T target, string colorPropertyName, float?r, float?g, float?b, float?a, float time, IEasing easing = null, bool realTime = false) { XColorHash hash = XColorHash.New; if (r != null) { hash.AddRed((float)r); } if (g != null) { hash.AddRed((float)g); } if (b != null) { hash.AddRed((float)b); } if (a != null) { hash.AddRed((float)a); } return(XTween.ToColor <T>(target, colorPropertyName, hash, time, easing, realTime)); }
public static XColorHash Color(float?r, float?g, float?b, float?a, bool isRelative = false) { XColorHash hash = XColorHash.New; if (r != null) { hash.AddRed((float)r, isRelative); } if (g != null) { hash.AddGreen((float)g, isRelative); } if (b != null) { hash.AddBlue((float)b, isRelative); } if (a != null) { hash.AddAlpha((float)a, isRelative); } return(hash); }