/// <summary> /// 点击UseItem按钮 /// </summary> private void ClickUseItemReminder() { if (UseItemRemindLogic.Instance() != null) { UseItemRemindLogic.Instance().SendMessage("OnUseBtClick", SendMessageOptions.DontRequireReceiver); } }
static void ShowUIOver(bool bSuccess, object param) { if (bSuccess) { List <object> initParams = param as List <object>; if (UseItemRemindLogic.Instance() != null) { UseItemRemindLogic.Instance().Init(initParams[0] as GameItem); } } }
void ShowRemind() { if (m_EquipBuffer.Count > 0) { // 未处在显示10秒和隐藏2秒状态 且自身需要显示 if (!m_EquipRemind.activeSelf && !m_bOnShow && !m_bOnHide) { //使用物品提醒在的时候 暂时不显示 if (UseItemRemindLogic.Instance() == null || (UseItemRemindLogic.Instance() != null && UseItemRemindLogic.Instance().m_ItemRemind.activeInHierarchy == false)) { m_fStartShowTime = Time.fixedTime; m_EquipRemind.SetActive(true); if (ItemRemindLogic.Instance() != null) { ItemRemindLogic.Instance().HandleEquipRemind(true); } if (m_EquipBuffer[0] == null || !m_EquipBuffer[0].IsValid()) { return; } Tab_CommonItem tabItem = TableManager.GetCommonItemByID(m_EquipBuffer[0].DataID, 0); if (tabItem != null) { m_EquipIconSprite.spriteName = tabItem.Icon; m_EquipIconSprite.MakePixelPerfect(); m_QualitySprite.spriteName = GlobeVar.QualityColorGrid[tabItem.Quality - 1]; m_NameLabel.text = tabItem.Name; m_LevelLabel.text = StrDictionary.GetClientDictionaryString("#{10156}", tabItem.MinLevelRequire); m_bOnShow = true; } } } // 处在显示状态且时间已达到10秒 if (Time.fixedTime - m_fStartShowTime >= ShowTime && m_bOnShow) { m_bOnShow = false; m_bOnHide = true; m_fStartShowTime = 0.0f; m_fStartHideTime = Time.fixedTime; m_EquipRemind.SetActive(false); if (ItemRemindLogic.Instance() != null) { ItemRemindLogic.Instance().HandleEquipRemind(false); } m_EquipBuffer.RemoveAt(0); } // 处在隐藏状态且时间已达到2秒 if (Time.fixedTime - m_fStartHideTime >= HideTime && m_bOnHide) { m_bOnHide = false; m_fStartHideTime = 0.0f; } } else { UIManager.CloseUI(UIInfo.EquipRemindRoot); } }