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

    public void Show(bool instant = false)
    {
        if (!mIsVisible && mIsEnabled)
        {
            if (OnShowBegin != null)
            {
                OnShowBegin.Invoke();
            }

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

            OnShow();
        }
    }
示例#2
0
        /// <summary>
        /// Performed when Show processes started.
        /// In inherited classes always use base.ShowBegin() when overriding this method.
        /// </summary>
        protected virtual void ShowBegin()
        {
            OnShowBegin.InvokeIfNotNull();

            _isScreenShown = true;
        }