示例#1
0
    // -------------------------------------------------------------------------------

    public void Hide(bool instant = false)
    {
        if (mIsVisible)
        {
            if (OnHideBegin != null)
            {
                OnHideBegin.Invoke();
            }

            UIManager.Instance.NotifyPointerExited(this);

            if (!instant && HideSfx != AudioManager.InvalidSfxName)
            {
                AudioManager.Instance.PlaySfx(null, HideSfx);
            }

            OnHide(instant);
        }
    }
示例#2
0
        /// <summary>
        /// Performed when Hide processes started.
        /// In inherited classes always use base.HideBegin() when overriding this method.
        /// </summary>
        protected virtual void HideBegin()
        {
            OnHideBegin.InvokeIfNotNull();

            _isScreenShown = false;
        }