コード例 #1
0
ファイル: TweenAPI.cs プロジェクト: hgrandry/unity-tween
        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));
        }
コード例 #2
0
ファイル: TweenAPI.cs プロジェクト: hgrandry/unity-tween
        // 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));
        }
コード例 #3
0
ファイル: TweenAPI.cs プロジェクト: hgrandry/unity-tween
        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));
        }