Exemple #1
0
        public BaseTween Move(Transform obj, Vector3 to, float t)
        {
            Vector3Tween tween = TweenPool.GetVector3Tween(obj.position, to, t);

            tween.PauseReset += () => tween.Init(obj.position, to, t);
            tween.SetOnUpdateVector3((Vector3 pos) =>
            {
                if (obj == null)
                {
                    CancelTween(tween);
                    return;
                }

                obj.position = pos;
            });
            return(ProcessTween(tween));
        }
Exemple #2
0
        public BaseTween ScaleTween(Transform t, Vector3 to, float time)
        {
            Vector3Tween tween = TweenPool.GetVector3Tween(t.localScale, to, time);

            tween.PauseReset += () => tween.Init(t.localScale, to, time);
            tween.SetOnUpdateVector3(delegate(Vector3 v)
            {
                if (t == null)
                {
                    CancelTween(tween);
                    return;
                }


                t.localScale = v;
            });
            return(ProcessTween(tween));
        }
Exemple #3
0
        public BaseTween VectorTween(Vector3 from, Vector3 to, float t)
        {
            Vector3Tween tween = TweenPool.GetVector3Tween(from, to, t);

            return(ProcessTween(tween));
        }