示例#1
0
        public static void SetTweenAlphaInfoByTweenGroup(GameObject go, int tweenGroup, float from, float to, float duration, float delay)
        {
            if (go == null)
            {
                return;
            }
            TweenAlpha tween = null;

            TweenAlpha[] components = go.GetComponents <TweenAlpha>();
            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.SetTweenAlphaInfoDetail(go, tween, from, to, duration, delay);
        }
示例#2
0
        public static void SetTweenAlphaInfo(GameObject go, float from, float to, float duration, float delay)
        {
            if (go == null)
            {
                return;
            }
            TweenAlpha component = go.GetComponent <TweenAlpha>();

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