コード例 #1
0
    public void TogglePlay(bool isOn)
    {
        if (tween == null)
        {
            targetBool = isOn;
            playEvent  = TogglePlay;
            return;
        }

        if (isOn)
        {
            panel.gameObject.SetActive(true);
            tween.PlayForward();
        }
        else
        {
            if (quickClose)
            {
                panel.gameObject.SetActive(false);
            }
            else
            {
                tween.PlayReverse();
            }
        }
    }
コード例 #2
0
 public void QuitAnim(UIAnimType animType, UnityAction onComplete)
 {
     ResetAnim(animType);
     if (onComplete != null)
     {
         tween.AddOnFinished(onComplete);
     }
     tween.ResetToComplete();
     tween.PlayReverse();
 }
コード例 #3
0
ファイル: Narration.cs プロジェクト: Pacman18/ProudTest
    protected override void OnButtonClick(string name)
    {
        base.OnButtonClick(name);

        if (name == GlobalUtil.BtnClose)
        {
            _tweenEvent.RemoveAllListeners();
            _tweenEvent.AddListener(() => UIManager.i.RemovePopup <Narration>());
            _tween.delay = 0;
            _tween.SetOnFinished(_tweenEvent);
            _tween.PlayReverse();

            _closeBtn.interactable = false;
        }
    }
コード例 #4
0
    public void TogglePlay(bool isOn)
    {
        if (tween == null)
        {
            targetBool = isOn;
            playEvent  = TogglePlay;
            return;
        }

        if (isOn)
        {
            tween.PlayForward();
        }
        else
        {
            tween.PlayReverse();
        }
    }