コード例 #1
0
 private void ShowAttachPage(bool doAnimationOff = true)
 {
     if (doAnimationOff)
     {
         this.partsUpperCutinGO.SetActive(false);
     }
     this.ejectItemCutinGO.SetActive(false);
     GameWebAPI.ReqDataCS_ChipEquipLogic equip = new GameWebAPI.ReqDataCS_ChipEquipLogic
     {
         dispNum       = this.selectedChipParameter.ConvertDispNum(),
         type          = this.selectedChipParameter.type,
         userMonsterId = CMD_ChipSphere.DataChg.userMonster.userMonsterId.ToInt32()
     };
     CMD_ChipInstalling.Create(equip, delegate(int userChipId, GameWebAPI.RespDataMA_ChipM.Chip attachedChip)
     {
         this.SetBarrier(true);
         global::Debug.Log(attachedChip.name);
         int index = this.selectedChipParameter.buttonNo - 1;
         this.chipSphereIconButtons[index].SetupOnlyDetailParams(userChipId, attachedChip);
         this.RefreshItemCountColor();
         this.RefreshStatus();
         this.RefreshItemNumbers();
         this.RefreshYellowLines();
         this.partsUpperCutinGO.transform.localPosition = this.chipButtonsPositions[index];
         this.partsUpperCutinGO.SetActive(false);
         int loadCount = 0;
         Action <ChipIcon> callback = delegate(ChipIcon chipIcon)
         {
             loadCount++;
             if (loadCount < this.partsUpperCutinTextures.Length)
             {
                 this.partsUpperCutinGO.SetActive(true);
                 this.attachAnimationTrigger.OnFinishAnimation = delegate(string str)
                 {
                     SoundMng.Instance().TryPlaySE("SEInternal/Common/se_110", 0f, false, true, null, -1);
                     this.chipSphereIconButtons[index].SetupDetail(userChipId, attachedChip);
                     this.SetBarrier(false);
                     this.isLoopOff = true;
                 };
                 this.chipSphereIconButtons[index].RefresAttachPage(false);
             }
         };
         foreach (UITexture baseIcon in this.partsUpperCutinTextures)
         {
             ChipTools.CreateChipIcon(attachedChip, baseIcon, callback);
         }
     });
 }
コード例 #2
0
    private IEnumerator Load(GameWebAPI.RespDataMA_ChipM.Chip data)
    {
        foreach (UITexture baseIcon in this.icons)
        {
            ChipTools.CreateChipIcon(data, baseIcon, delegate(ChipIcon chipIcon)
            {
                this.chipIconList.Add(chipIcon);
            });
        }
        float maxTime     = 30f;
        float currentTime = 0f;

        while (this.chipIconList.Count < this.icons.Length)
        {
            currentTime += Time.deltaTime;
            if (currentTime >= maxTime)
            {
                yield break;
            }
            yield return(null);
        }
        yield break;
    }