// 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)); }
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)); }
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)); }