예제 #1
0
        public static Tweener SetStart(this TweenAnimation tweenAnimation)
        {
            var tweener = tweenAnimation.Tweener ?? tweenAnimation.CreateTweener();

            tweener.SetStart();
            return(tweener);
        }
예제 #2
0
        public void EditorPlay()
        {
            if (!Application.isPlaying)
            {
                TweenManager.Ins.PreviewTweenerList.Add(Tweener);
            }
            else
            {
                if (Tweener == null)
                {
                    TweenAnimation.CreateTweener();
                }
            }

            TweenAnimation.SyncTweenerParams();
            Tweener
            .SetPlayCallback(() =>
            {
                EnableEditor = false;
            })
            .SetStopCallback(() =>
            {
                Tweener.SetStart();
                EnableEditor = true;
            })
            .Play();
            EnableEditor = false;
        }
예제 #3
0
        public static Tweener TogglePause(this TweenAnimation tweenAnimation)
        {
            var tweener = tweenAnimation.Tweener ?? tweenAnimation.CreateTweener();

            tweener.TogglePause();
            return(tweener);
        }
예제 #4
0
        public static Tweener Stop(this TweenAnimation tweenAnimation, bool destroy = true)
        {
            var tweener = tweenAnimation.Tweener ?? tweenAnimation.CreateTweener();

            tweener.Stop(destroy);
            return(tweener);
        }
예제 #5
0
        public static Tweener Resume(this TweenAnimation tweenAnimation)
        {
            var tweener = tweenAnimation.Tweener ?? tweenAnimation.CreateTweener();

            tweener.Resume();
            return(tweener);
        }
예제 #6
0
        public static Tweener PlayBackwardImmediately(this TweenAnimation tweenAnimation)
        {
            var tweener = tweenAnimation.Tweener ?? tweenAnimation.CreateTweener();

            tweener.PlayBackward(true);
            return(tweener);
        }
예제 #7
0
        public static Tweener PlayBackward(this TweenAnimation tweenAnimation, bool immediately = false)
        {
            var tweener = tweenAnimation.Tweener ?? tweenAnimation.CreateTweener();

            tweener.PlayBackward(immediately);
            return(tweener);
        }
예제 #8
0
        public static Tweener Play(this TweenAnimation tweenAnimation)
        {
            var tweener = tweenAnimation.Tweener ?? tweenAnimation.CreateTweener();

            tweener.Play();
            return(tweener);
        }
예제 #9
0
        public static Tweener SetScheduleByRunTime(this TweenAnimation tweenAnimation, float runTime)
        {
            var tweener = tweenAnimation.Tweener ?? tweenAnimation.CreateTweener();

            tweener.SetScheduleByRunTime(runTime);
            return(tweener);
        }
예제 #10
0
        public void EditorApplyEdit()
        {
            if (EnableEditor)
            {
                if (Tweener != null)
                {
                    TweenAnimation?.SyncTweenerParams();
                }
            }

            EnableEditor = !EnableEditor;
        }