Exemplo n.º 1
0
        //Transform的DoScale方法拓展
        public static Tween DoScale(this Transform transform, Vector3 target, float time)
        {
            MonoBehaviour mono      = transform.GetComponents <MonoBehaviour>()[0];
            Tween         tween     = new Tween("DoScale", target, time, transform, null);
            Coroutine     coroutine = mono.StartCoroutine(mono.DoScale(tween));

            tween.setCoroutine(coroutine);
            return(tween);
        }
Exemplo n.º 2
0
        public static Tween DoScale(this Transform transform, Vector3 target, float duration)
        {
            MonoBehaviour mono  = transform.GetComponent <MonoBehaviour>();
            Tween         tween = new Tween(transform, duration);

            tween.target = target;
            Coroutine co = mono.StartCoroutine(mono.DoScale(tween));

            tween.SetCoroutine(co);
            return(tween);
        }