Example #1
0
        //数值变化Tween
        public static ValueUpdate Value(float delay, float startValue, float toValue, float time, BEaseType method, Action <float> updateEvent, Action finishEvent = null)
        {
            GameObject  go          = new GameObject("ValueTween");
            ValueUpdate valueUpdate = go.GetComponent <ValueUpdate>();

            if (!valueUpdate)
            {
                valueUpdate = go.AddComponent <ValueUpdate>();
            }
            valueUpdate.Value(delay, startValue, toValue, time, method, updateEvent, finishEvent);
            return(valueUpdate);
        }