Esempio n. 1
0
 /// <summary>
 /// 重设Input的引用计数, 只能在进入副本和主城状态的时候使用
 /// </summary>
 public void ResetInputRef()
 {
     mInputRef     = 0;
     mbEnableInput = true;
     RockCommandSystem.GetInstance().Enable = mbEnableInput;
     Debug.LogWarning("EnableInput ref: " + mInputRef);
 }
Esempio n. 2
0
        public void EnableInput(bool b, bool set_ui = false)
        {
            if (!b)
            {
                mInputRef++;
            }
            else
            {
                mInputRef--;
            }
            if (mInputRef <= 0)
            {
                mbEnableInput = true;
            }
            else
            {
                mbEnableInput = false;
            }
            RockCommandSystem.GetInstance().Enable = mbEnableInput;

            if (set_ui)
            {
                EventSystem event_sys = xc.ui.ugui.UIManager.Instance.MainCtrl.EventSystemCom;
                if (event_sys != null)
                {
                    event_sys.enabled = mbEnableInput;
                }
            }
            //Debug.LogWarning("EnableInput ref: " + mInputRef);
        }