示例#1
0
    public Red.RedTween.Set FadeContents(GameObject go, float from, float to, float time, Action endAnimationAction = null, float delay = 0, Red.EaseType easeType = Red.EaseType.EaseOutQuart)
    {
        // This will fade both images and text
        if (go == null)
        {
            if (endAnimationAction != null)
            {
                endAnimationAction();
            }
            return(null);
        }

        return(Red.RedTween.UIFadeTo(go.GetComponentsInChildren <Graphic>(), to, time, easeType, endAnimationAction, delay));
    }
示例#2
0
    public Red.RedTween.Set SlideRight(GameObject go, float amount, float time, Action endAnimationAction = null, float delay = 0.0f, Red.EaseType easeType = Red.EaseType.EaseOutQuart)
    {
        if (go == null)
        {
            if (endAnimationAction != null)
            {
                endAnimationAction();
            }
            return(null);
        }

        return(Red.RedTween.UIMoveBy(go.GetComponent <RectTransform>(), new Vector3(amount, 0, 0), time, easeType, endAnimationAction, delay));
    }