public bool Animate (UIAnimation animation, RectTransform rect=null) { if (!AllowSimultaneous && Animating) return false; animation.Rect = rect == null ? gameObject.GetComponent<RectTransform> () : rect; currentAnimation = animation; animation.Start (); return true; }
public bool Animate(UIAnimation animation, RectTransform rect = null) { if (!AllowSimultaneous && Animating) { return(false); } animation.Rect = rect == null?gameObject.GetComponent <RectTransform> () : rect; currentAnimation = animation; animation.Start(); return(true); }