Esempio n. 1
0
    public void ShowFinish()
    {
        isActive = true;

        OnShowEvent?.Invoke();
        ShowFinishEvent?.Invoke();
    }
Esempio n. 2
0
        public void Show(bool show, bool immediate = false)
        {
            if (_shown == show)
            {
                return;
            }

            _shown = show;

            OnShowEvent?.Invoke(_shown);

            _delayCompleteTween.KillIfPlaying(false);

            ShowAnimation(_shown);

            foreach (var uiElement in _nested)
            {
                if (uiElement != null)
                {
                    uiElement.Show(show, immediate);
                }
                else
                {
                    Debug.LogError($"Please, remove null reference in nested list of UIElement on GameObject '{gameObject.name}'");
                }
            }

            _delayCompleteTween = DOVirtual.DelayedCall(AnimationDuration, () =>
            {
                InvokeAnimCompleteEvent(show);
            });
        }
Esempio n. 3
0
 public void Show()
 {
     if (IsShown)
     {
         return;
     }
     IsShown = true;
     OnShow();
     OnShowEvent.Invoke();
     go.SetActive(true);
 }
Esempio n. 4
0
    public void Show()
    {
        CacheTransition.Show();
        OnShowEvent.Invoke();
        // invoke finished event
        var showDuration = CacheTransition.GetShowDuration();

        if (showDuration > 0f)
        {
            LeanTween.delayedCall(showDuration, _ => OnShowFinishedEvent.Invoke());
        }
        else
        {
            OnShowFinishedEvent.Invoke();
        }
    }
Esempio n. 5
0
 public void TriggerOnShowEvent()
 {
     OnShowEvent?.Invoke(this);
 }