Пример #1
0
    void GemSlotOnClick(int nItemID, ItemSlotLogic.SLOT_TYPE eItemType, string strSlotName)
    {
        Tab_GemAttr tabGemAttr = TableManager.GetGemAttrByID(nItemID, 0);

        if (tabGemAttr == null)
        {
            m_GemClickSlot = strSlotName;
            OpenGemView();
        }
        else
        {
            if (m_GemTips.activeSelf && m_GemClickSlot == strSlotName)
            {
                m_GemTips.SetActive(false);
                m_GemNameLabel.text = "";
                m_GemAttrLabel.text = "";
                m_GemClickSlot      = "";
            }
            else
            {
                m_GemTips.SetActive(true);
                m_GemNameLabel.text = tabGemAttr.Name;
                m_GemAttrLabel.text = ItemTool.GetGemAttr(nItemID);
                m_GemClickSlot      = strSlotName;
            }
        }
    }
Пример #2
0
 void ShowChooseGemInfo(GameItem item)
 {
     if (item.IsValid())
     {
         m_EquipGemNameLabel.text = item.GetName();
         m_EquipGemAttrLable.text = ItemTool.GetGemAttr(item.DataID);
         m_EquipGemLvLabel.text   = GetGemLevelString(item.GetMinLevelRequire());
         Tab_GemMount line = TableManager.GetGemMountByID((m_CurGemSlot + 1), 0);
         if (line != null)
         {
             //m_EquipGemCoinNum.text = string.Format("消耗金币:{0}", line.ConsumeNum);
             m_EquipGemCoinNum.text = StrDictionary.GetClientDictionaryString("#{2836}", line.ConsumeNum);
         }
     }
 }
Пример #3
0
 private void WriteGemDes()
 {
     for (int i = 0; i < (int)CONSTVALUE.GEM_SLOT_NUM; ++i)
     {
         Tab_CommonItem line = TableManager.GetCommonItemByID(m_GemSlotId[i], 0);
         if (line != null)
         {
             m_GemName[i].text  = line.Name;
             m_GemdDes[i].text  = ItemTool.GetGemAttr(m_GemSlotId[i]);
             m_GemLevel[i].text = line.CompondLevel.ToString();
         }
         else
         {
             m_GemName[i].text  = "";
             m_GemdDes[i].text  = "";
             m_GemLevel[i].text = "";
         }
     }
 }
Пример #4
0
 void ShowUnEquipPage()
 {
     //m_Page_Help.gameObject.SetActive(false);
     m_Page_Equip.gameObject.SetActive(false);
     CloseEquip();
     m_Page_UnEquip.gameObject.SetActive(true);
     m_GemHelpInfo.SetActive(false);
     if (m_CurGemSlot >= 0 && m_CurGemSlot < (int)CONSTVALUE.GEM_SLOT_NUM)
     {
         int gemId = m_GemSlotId[m_CurGemSlot];
         if (gemId >= 0)
         {
             Tab_CommonItem line = TableManager.GetCommonItemByID(gemId, 0);
             if (line != null)
             {
                 m_ChooseGem.InitInfo(ItemSlotLogic.SLOT_TYPE.TYPE_ITEM, gemId);
                 m_ChooseGemNameLabel.text = line.Name;
                 m_ChooseGemAttrLabel.text = ItemTool.GetGemAttr(gemId);
             }
         }
     }
 }