Esempio n. 1
0
        public static ITween Tween(this Component owner, Func <Vector2> get, Action <Vector2> set, Vector2 target, float duration)
        {
            Vector2TweenState state = TweenPool.V2.Get(s => s.Init(get(), set, target));

            return(Tweener.Create(owner, state, duration));
        }
Esempio n. 2
0
        // RectTransform

        public static ITween TweenAnchorPos(this RectTransform owner, Vector2 target, float duration)
        {
            Vector2TweenState state = TweenPool.V2.Get(s => s.Init(owner.anchoredPosition, v => owner.anchoredPosition = v, target));

            return(Tweener.Create(owner, state, duration));
        }
Esempio n. 3
0
        public static ITween TweenPivot(this RectTransform owner, Vector2 target, float duration)
        {
            Vector2TweenState state = TweenPool.V2.Get(s => s.Init(owner.pivot, v => owner.pivot = v, target));

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