Beispiel #1
0
    private void ShowItemIcon()
    {
        if (this.baseDigimon != null && this.medList_cache.Count > 0)
        {
            List <EvolutionData.MonsterEvolveItem> itemList = this.medList_cache[0].itemList;
            int i;
            for (i = 0; i < itemList.Count; i++)
            {
                VersionUpItem vupItem = this.verUpItemList[i];
                vupItem.AlmightySoulData = null;
                vupItem.gameObject.SetActive(true);
                vupItem.spIcon.enabled  = false;
                vupItem.texIcon.enabled = true;
                vupItem.spNumPlate.gameObject.SetActive(true);
                vupItem.lbNum.gameObject.SetActive(true);
                string soulId = itemList[i].sd_item.soulId;
                vupItem.SetTouchAct_L(delegate
                {
                    this.ActCallBackDropItem(vupItem);
                });
                vupItem.baseSoulData            = new HaveSoulData();
                vupItem.baseSoulData.soulM      = VersionUpMaterialData.GetSoulMasterBySoulId(soulId);
                vupItem.baseSoulData.haveNum    = itemList[i].haveNum;
                vupItem.baseSoulData.curUsedNum = 0;
                vupItem.NeedNum = itemList[i].need_num;
                string evolveItemIconPathByID = ClassSingleton <EvolutionData> .Instance.GetEvolveItemIconPathByID(soulId);

                if (vupItem.baseSoulData.haveNum < vupItem.NeedNum)
                {
                    HaveSoulData almightySoulData = null;
                    bool         flag             = VersionUpMaterialData.CanChangeToAlmighty(this.almHasList_cache, vupItem.baseSoulData.soulM.soulId, vupItem.NeedNum, ref almightySoulData);
                    if (flag)
                    {
                        vupItem.AlmightySoulData             = almightySoulData;
                        vupItem.AlmightySoulData.curUsedNum += vupItem.NeedNum;
                        evolveItemIconPathByID = ClassSingleton <EvolutionData> .Instance.GetEvolveItemIconPathByID(vupItem.AlmightySoulData.soulM.soulId);
                    }
                }
                Vector3 localScale = vupItem.gameObject.transform.localScale;
                vupItem.gameObject.transform.localScale = Vector2.zero;
                this.LoadObjectASync(evolveItemIconPathByID, vupItem, localScale);
            }
            while (i < this.verUpItemList.Count)
            {
                this.verUpItemList[i].gameObject.SetActive(false);
                i++;
            }
            this.SetAlmightyIcon();
        }
    }
Beispiel #2
0
 private void ClearItemIcon()
 {
     for (int i = 0; i < this.verUpItemList.Count; i++)
     {
         VersionUpItem versionUpItem = this.verUpItemList[i];
         versionUpItem.gameObject.SetActive(true);
         versionUpItem.spIcon.enabled  = true;
         versionUpItem.texIcon.enabled = false;
         versionUpItem.lbSelect.gameObject.SetActive(false);
         versionUpItem.spNumPlate.gameObject.SetActive(false);
         versionUpItem.lbNum.gameObject.SetActive(false);
         versionUpItem.SetTouchAct_S(null);
         versionUpItem.SetTouchAct_L(null);
     }
 }