Beispiel #1
0
 public void EnterAnim(UIAnimType animType, UnityAction onComplete)
 {
     ResetAnim(animType);
     if (onComplete != null)
     {
         tween.AddOnFinished(onComplete);
     }
     tween.ResetToBeginning();
     tween.PlayForward();
 }
    void Start()
    {
        switch (type)
        {
        case TweenType.ScalePanel:
            tween = uTweenScale.Begin(panel, Vector3.one * 0.8f, panel.localScale, duration);
            break;

        case TweenType.PosUpPanel:
            tween = uTweenPosition.Begin(panel, Vector3.left * 200, Vector3.zero, duration);
            break;

        case TweenType.RotatePanel:
            tween = uTweenRotation.Begin(panel, Vector3.up * 30, Vector3.zero, duration);
            break;

        default:
            break;
        }
        tween.AddOnFinished(OnFinish);
        panel.gameObject.SetActive(false);

        if (playEvent != null)
        {
            playEvent(targetBool);
            playEvent = null;
        }
    }
Beispiel #3
0
 public virtual void PlayAnim(bool isEnter, UnityAction onComplete)
 {
     tween = CreateTweener(isEnter);
     if (onComplete != null)
     {
         tween.AddOnFinished(onComplete);
     }
     tween.ResetToBeginning();
     tween.PlayForward();
 }
Beispiel #4
0
    void Start()
    {
        switch (type)
        {
        case TweenType.WorningPanel:
            tween = uTweenColor.Begin(panel, Color.white, Color.red, duration); /*.Begin(panel, Vector3.one * 0.8f, panel.localScale , duration);*/
            break;

        default:
            break;
        }
        tween.AddOnFinished(OnFinish);

        if (playEvent != null)
        {
            playEvent(targetBool);
            playEvent = null;
        }
    }