Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }