public StringCurve(string propName, Ease ease, float dur, string start, string end, StringTweenStyle style) : base(propName, ease, dur) { _start = start; _end = end; _style = style; }
void ISupportRedirectToMemberCurve.ConfigureAsRedirectTo(System.Type memberType, float totalDur, object current, object start, object end, object option) { _style = ConvertUtil.ToEnum <StringTweenStyle>(option, StringTweenStyle.Default); var c = Convert.ToString(current) ?? string.Empty; var s = Convert.ToString(start) ?? string.Empty; var e = Convert.ToString(end) ?? string.Empty; _start = c; _end = e; int tl = e.Length - s.Length; int l = c.Length - s.Length; if (tl == 0) { this.Duration = 0f; } else { this.Duration = totalDur * (1f - (float)l / (float)tl); } }
protected override void ReflectiveInit(object start, object end, object option) { _start = Convert.ToString(start) ?? string.Empty; _end = Convert.ToString(end) ?? string.Empty; _style = ConvertUtil.ToEnum<StringTweenStyle>(option, StringTweenStyle.Default); }
protected override void ReflectiveInit(System.Type memberType, object start, object end, object option) { _start = Convert.ToString(start) ?? string.Empty; _end = Convert.ToString(end) ?? string.Empty; _style = ConvertUtil.ToEnum <StringTweenStyle>(option, StringTweenStyle.Default); }