Beispiel #1
0
 private void ResetSelectImg(SelectImgType type)
 {
     if (type == SelectImgType.Check)
     {
         this.m_goImageSelect2.get_gameObject().SetActive(false);
         this.currentSelectType = SelectImgType.Check;
     }
     else if (type == SelectImgType.HighLight)
     {
         this.m_goImageSelect.get_gameObject().SetActive(false);
         this.currentSelectType = SelectImgType.HighLight;
     }
 }
Beispiel #2
0
    public void SetEquipItemData(int itemID, long equipID, SelectImgType selectType = SelectImgType.HighLight)
    {
        FXSpineManager.Instance.DeleteSpine(this.m_equipFXID, true);
        if (!this.isInit)
        {
            this.InitUI();
        }
        this.EquipID = equipID;
        this.ItemID  = itemID;
        Dictionary <string, string> equipIconNamesByEquipDataID = EquipGlobal.GetEquipIconNamesByEquipDataID(itemID, true);

        if (equipIconNamesByEquipDataID == null)
        {
            return;
        }
        if (this.m_spImageFrame == null)
        {
            return;
        }
        if (this.m_spImageFramePet == null)
        {
            return;
        }
        ResourceManager.SetSprite(this.m_spImageFrame, ResourceManager.GetIconSprite(equipIconNamesByEquipDataID.get_Item("IconFrameName")));
        ResourceManager.SetSprite(this.m_spImageFramePet, ResourceManagerBase.GetNullSprite());
        ResourceManager.SetSprite(this.m_spImageIcon, ResourceManager.GetIconSprite(equipIconNamesByEquipDataID.get_Item("IconName")));
        this.m_numTxt.set_text(string.Empty);
        this.currentSelectType = selectType;
        base.FindTransform("ItemStep").get_gameObject().SetActive(true);
        this.m_itemStepTxt.set_text(equipIconNamesByEquipDataID.get_Item("EquipStep"));
        this.ExcellentCount = EquipGlobal.GetExcellentAttrsCountByColor(equipID, 1f);
        EquipSimpleInfo  equipSimpleInfoByEquipID = EquipGlobal.GetEquipSimpleInfoByEquipID(equipID);
        TaoZhuangDuanZhu equipForgeCfgData        = EquipGlobal.GetEquipForgeCfgData(equipID);

        if (equipSimpleInfoByEquipID != null && equipForgeCfgData != null && equipSimpleInfoByEquipID.suitId > 0)
        {
            ResourceManager.SetSprite(this.m_spImageFrame, ResourceManager.GetIconSprite(equipForgeCfgData.frame));
        }
        this.SetImageBinding(equipSimpleInfoByEquipID != null && equipSimpleInfoByEquipID.binding);
    }
Beispiel #3
0
    public void SetGemIcon(int itemID, int count)
    {
        this.ItemID = itemID;
        Items items = DataReader <Items> .Get(itemID);

        if (items == null)
        {
            return;
        }
        if (!this.isInit)
        {
            this.InitUI();
        }
        int num = items.color;

        if (num == 0)
        {
            num = 1;
        }
        if (this.m_spImageFrame == null)
        {
            return;
        }
        if (this.m_spImageFramePet == null)
        {
            return;
        }
        ResourceManager.SetSprite(this.m_spImageFrame, GameDataUtils.GetItemFrameByColor(num));
        ResourceManager.SetSprite(this.m_spImageFramePet, ResourceManagerBase.GetNullSprite());
        ResourceManager.SetSprite(this.m_spImageIcon, GameDataUtils.GetIcon(items.icon));
        this.m_numTxt.get_gameObject().SetActive(true);
        this.m_numTxt.set_text(count.ToString());
        this.currentSelectType = SelectImgType.HighLight;
        if (items != null && items.step > 0)
        {
            base.FindTransform("ItemStep").get_gameObject().SetActive(true);
            this.m_itemStepTxt.set_text(string.Format(GameDataUtils.GetChineseContent(505023, false), items.step));
        }
    }