public void OnCursorEnter()
 {
     //Debug.Log (IsOpen);
     if (IsOpen)
     {
         //Debug.Log ("enter");
         if (!m_repeat && IsClose)
         {
             return;
         }
         m_isTrigger = true;
         CursorManager.SetCursor(m_cursor);
                     #if UNITY_STANDALONE_WIN || UNITY_EDITOR
         if (!string.IsNullOrEmpty(m_hint))
         {
             m_msgCtr = MessageUI.AutoShowMessage(m_hint, false, () => {
                 if (null != m_msgCtr)
                 {
                     GameObject.Destroy(m_msgCtr.gameObject);
                     m_msgCtr = null;
                 }
             }, 1);
         }
                     #endif
     }
 }
 public override void Play(int eventID)
 {
     if (m_isPlaying)
     {
         return;
     }
     else
     {
         m_isPlaying = true;
     }
     MessageUI.AutoShowMessage(msg, true, OnShowMessageOver, 2);
     m_quiltGO.SetActive(false);
 }
 public void OnCursorSelect()
 {
     if (m_isTrigger)
     {
         if (!string.IsNullOrEmpty(m_triggerMsg))
         {
             m_triggerMsgCtr = MessageUI.AutoShowMessage(m_triggerMsg, true, () => {
                 if (null != m_triggerMsgCtr)
                 {
                     GameObject.Destroy(m_triggerMsgCtr.gameObject);
                     m_triggerMsgCtr = null;
                 }
             }, 2);
         }
         Play();
     }
 }
 public void OnLockClick()
 {
     AudioManager.Instance.PlayAudio(m_unlockAudioClicp, false);
     if (m_numText.text.Equals("0607"))
     {
         m_lockGO.SetActive(false);
         m_unlockGO.SetActive(true);
         StartCoroutine(UnlockOver(m_unlockAudioClicp.length));
     }
     else
     {
         m_numText.text = "";
         m_inputChar.SetActive(true);
         uiCtr = MessageUI.AutoShowMessage("密码一定是重要的东西", true, () => {
             if (null != uiCtr)
             {
                 GameObject.Destroy(uiCtr.gameObject);
                 uiCtr = null;
             }
         }, 2);
     }
 }
예제 #5
0
    public void OnStudyClick()
    {
        if (GameData.HasBrain && GameData.HasCoin && GameData.HasEye && GameData.HasFinger &&
            GameData.HasHead && GameData.HasHeart && GameData.HasLung && GameData.HasSeed && GameData.HasStomach)
//		if(true)
        {
            GameStateManager.Instance().FSM.CurrentState.Message("Study", null);
        }
        else
        {
            msgCtr = MessageUI.AutoShowMessage("缺少一些东西才能进入", true, () => {
                if (null != msgCtr)
                {
                    GameObject.Destroy(msgCtr.gameObject);
                    msgCtr = null;
                }
                if (null != m_keyGO)
                {
                    m_keyGO.SetActive(false);
                }
            }, 2);
        }
    }