Example #1
0
    public static CMD_ChipInstalling Create(GameWebAPI.ReqDataCS_ChipEquipLogic equip, Action <int, GameWebAPI.RespDataMA_ChipM.Chip> successChipCallback)
    {
        CMD_ChipInstalling cmd_ChipInstalling = GUIMain.ShowCommonDialog(null, "CMD_ChipInstalling", null) as CMD_ChipInstalling;

        cmd_ChipInstalling.equip = equip;
        cmd_ChipInstalling.successChipCallback = successChipCallback;
        return(cmd_ChipInstalling);
    }
 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);
         }
     });
 }