public static void AnimateBetweenValues(this Text textField, float fromValue, float toValue, float increment, float timePerIncrement, int decimalPlaces, float delay) { UIAnimateValueElement animElement = textField.GetAnimationElement(); animElement.AnimateValue(fromValue, toValue, increment, timePerIncrement, decimalPlaces, delay); }
public static UIAnimateValueElement GetAnimationElement(this Text textField) { UIAnimateValueElement animElement = textField.GetComponent <UIAnimateValueElement>(); if (animElement == null) { animElement = textField.gameObject.AddComponent <UIAnimateValueElement>(); } return(animElement); }
public static void FinalizeAnimationImmediately(this Text textField) { UIAnimateValueElement animElement = textField.GetAnimationElement(); animElement.FinalizeAnimationImmediately(); }