/// <summary> /// Start the tweening operation. /// </summary> static public UI_TweenScale Begin(GameObject go, float duration, Vector3 scale) { UI_TweenScale comp = UI_Tween.Begin <UI_TweenScale>(go); comp.duration = duration; comp.to = scale; if (duration <= 0f) { comp.tweenTarget.transform.localScale = scale; comp.enabled = false; } return(comp); }
/// <summary> /// Start the tweening operation. /// </summary> static public UI_TweenPosition Begin(GameObject go, float duration, Vector3 pos) { UI_TweenPosition comp = UI_Tween.Begin <UI_TweenPosition>(go); comp.duration = duration; comp.to = pos; if (duration <= 0f) { comp.tweenTarget.transform.localPosition = pos; comp.enabled = false; } return(comp); }
/// <summary> /// Start the tweening operation. /// </summary> static public UI_TweenGroup Begin(GameObject go, float duration, float alpha) { UI_TweenGroup comp = UI_Tween.Begin <UI_TweenGroup>(go); comp.duration = duration; comp.to = alpha; if (duration <= 0f) { if (comp.m_cCanvasGroup != null) { comp.m_cCanvasGroup.alpha = alpha; } comp.enabled = false; } return(comp); }
/// <summary> /// Start the tweening operation. /// </summary> static public UI_TweenColor Begin(GameObject go, float duration, Color color) { UI_TweenColor comp = UI_Tween.Begin <UI_TweenColor>(go); comp.duration = duration; comp.to = color; if (duration <= 0f) { if (comp.m_cImage != null) { comp.m_cImage.color = color; } comp.enabled = false; } return(comp); }