public void Hide(float hideSpeedInSeconds)
    {
        HideStarted?.Invoke();

        if (_animationRoutine != null)
        {
            StopCoroutine(_animationRoutine);
        }
        _animationRoutine = StartCoroutine(HideRoutine(hideSpeedInSeconds));
    }
Beispiel #2
0
        public void Hide()
        {
            if (state == UIState.Hidden || state == UIState.Hiding)
            {
                return;
            }

            state = UIState.Hiding;

            HideStarted?.Invoke(this);

            gameObject.SetActive(false);
        }
 /// <summary>
 /// Handler method for when the <see cref="uiView"/> component's <see cref="UIView.HideBehavior"/> starts.
 /// </summary>
 protected virtual void OnHideStarted()
 {
     HideStarted?.Invoke(this);
 }