Exemple #1
0
    private void SetAlmightyIcon()
    {
        List <EvolutionData.MonsterEvolveItem> itemList = this.medList_cache[0].itemList;

        for (int i = 0; i < itemList.Count; i++)
        {
            VersionUpItem vupItem = this.verUpItemList[i];
            bool          flag;
            if (vupItem.AlmightySoulData != null)
            {
                flag = true;
            }
            else
            {
                HaveSoulData haveSoulData = null;
                flag = VersionUpMaterialData.CanChangeToAlmighty(this.almHasList_cache, vupItem.baseSoulData.soulM.soulId, vupItem.NeedNum, ref haveSoulData);
            }
            if (flag)
            {
                vupItem.lbSelect.gameObject.SetActive(true);
                vupItem.SetTouchAct_S(delegate
                {
                    this.SHowAlmightySelect(vupItem);
                });
            }
            else
            {
                vupItem.lbSelect.gameObject.SetActive(false);
                vupItem.SetTouchAct_S(null);
            }
        }
    }
Exemple #2
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();
        }
    }