public static ValueTween Run(GameObject item, int from, int to, float duration, Action <int> updateAction) { ValueTween tween = Create <ValueTween>(item, duration); tween._fromInt = from; tween._toInt = to; tween._updateActionInt = updateAction; tween._isIntegerValue = true; return(tween); }
public static ValueTween Run(GameObject item, float from, float to, float duration, Action <float> updateAction) { ValueTween tween = Create <ValueTween>(item, duration); tween._fromFloat = from; tween._toFloat = to; tween._updateActionFloat = updateAction; tween._isIntegerValue = false; return(tween); }