Example #1
0
        // CanvasGroup

        public static ITween TweenAlpha(this CanvasGroup owner, float target, float duration)
        {
            FloatTweenState state = TweenPool.Float.Get(s => s.Init(owner.alpha, x => owner.alpha = x, target));

            return(Tweener.Create(owner, state, duration));
        }
Example #2
0
        public static ITween Delay(this Component owner, float delay, Action action)
        {
            FloatTweenState state = TweenPool.Float.Get(s => s.Init(0, _ => {}, 0));

            return(Tweener.Create(owner, state, 0).SetDelay(delay).OnComplete(action));
        }
Example #3
0
        public static ITween Tween(this Component owner, Func <float> get, Action <float> set, float target, float duration)
        {
            FloatTweenState state = TweenPool.Float.Get(s => s.Init(get(), set, target));

            return(Tweener.Create(owner, state, duration));
        }