예제 #1
0
        public static void SetTweenPositionInfoByTweenGroup(GameObject go, int tweenGroup, Vector3 from, Vector3 to, float duration, float delay)
        {
            if (go == null)
            {
                return;
            }
            TweenPosition tween = null;

            TweenPosition[] components = go.GetComponents <TweenPosition>();
            if (components != null && components.Length > 1)
            {
                for (int i = 0; i < components.Length; i++)
                {
                    if (components[i].tweenGroup == tweenGroup)
                    {
                        tween = components[i];
                        break;
                    }
                }
            }
            else if (components != null && components.Length == 1)
            {
                tween = components[0];
            }
            TweenUtil.SetTweenPositionInfoDetail(go, tween, from, to, duration, delay);
        }
예제 #2
0
        public static void SetTweenPositionInfo(GameObject go, Vector3 from, Vector3 to, float duration, float delay)
        {
            if (go == null)
            {
                return;
            }
            TweenPosition component = go.GetComponent <TweenPosition>();

            TweenUtil.SetTweenPositionInfoDetail(go, component, from, to, duration, delay);
        }