public override void copyFrom(UITweener value) { base.copyFrom(value); UITweenColor other = value as UITweenColor; if (other != null) { this.from = other.from; this.to = other.to; this.isIncludeAll = other.isIncludeAll; } }
/// <summary> /// Start the tweening operation. /// </summary> public static UITweenColor Begin(GameObject go, float duration, Color color) { #if UNITY_EDITOR if (!Application.isPlaying) { return(null); } #endif UITweenColor comp = UITweener.Begin <UITweenColor>(go, duration); comp.from = comp.value; comp.to = color; if (duration <= 0f) { comp.Sample(1f, true); comp.enabled = false; } return(comp); }