private void EndEject(int resultCode) { if (resultCode == 1) { this.SetBarrier(true); int num = this.selectedChipParameter.ConvertButtonIndex(); this.chipSphereIconButtons[num].SetupEmpty(); this.RefreshItemCountColor(); this.RefreshStatus(); this.RefreshItemNumbers(); this.RefreshYellowLines(); string texname = string.Format("ChipThumbnail/{0}", "eject_slot_01"); foreach (UITexture uiTex in this.ejectItemCutinTextures) { NGUIUtil.ChangeUITextureFromFileASync(uiTex, texname, false, null); } this.ejectItemCutinGO.transform.localPosition = this.chipButtonsPositions[num]; this.ejectItemCutinGO.SetActive(false); this.ejectItemCutinGO.SetActive(true); this.ejectAnimationTrigger.OnFinishAnimation = delegate(string str) { this.SetBarrier(false); this.isLoopOff = true; }; SoundMng.Instance().TryPlaySE("SEInternal/Common/se_108", 0f, false, true, null, -1); this.chipSphereIconButtons[num].OnTouch(); RestrictionInput.EndLoad(); } else { ChipTools.CheckResultCode(resultCode); this.DispErrorModal(resultCode); } }
public void SetupDetail(int userChipId, GameWebAPI.RespDataMA_ChipM.Chip chipData) { this.isOpened = true; this.SetupOnlyDetailParams(userChipId, chipData); this.frameSprite.spriteName = "Chip_Sphere_Thumbnail_ON"; NGUITools.SetActiveSelf(this.chargesGO, false); NGUITools.SetActiveSelf(this.lookGO, false); NGUITools.SetActiveSelf(this.chipNameLabel.gameObject, true); NGUITools.SetActiveSelf(this.chipDescriptLabel.gameObject, true); this.chipNameLabel.text = this.myParameter.chipName; this.chipDescriptLabel.text = this.myParameter.chipDetail; NGUIUtil.ChangeUITextureFromFileASync(this.chipTexture, chipData.GetIconPath(), false, null); NGUITools.SetActiveSelf(this.rankSprite.gameObject, true); this.rankSprite.spriteName = ChipTools.GetRankPath(chipData.rank); }
private void EndAttachment(int resultCode) { if (resultCode == 1) { this.successCallback(); RestrictionInput.EndLoad(); base.ClosePanel(true); } else { RestrictionInput.EndLoad(); ChipTools.CheckResultCode(resultCode); this.DispErrorModal(resultCode); } }
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); } }); }
private void SetupIcon(GameWebAPI.RespDataMA_ChipM.Chip chipMainData) { NGUITools.SetActiveSelf(this.thumbnailTexture.gameObject, true); NGUIUtil.ChangeUITextureFromFileASync(this.thumbnailTexture, chipMainData.GetIconPath(), false, null); if (this.rareSprite != null) { this.rareSprite.spriteName = ChipTools.GetRankPath(chipMainData.rank); NGUITools.SetActiveSelf(this.rareSprite.gameObject, true); } if (this.noChipLabel != null) { NGUITools.SetActiveSelf(this.noChipLabel.gameObject, false); } if (this.chipNameLabel != null) { NGUITools.SetActiveSelf(this.chipNameLabel.gameObject, true); this.chipNameLabel.text = chipMainData.name; } }
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; }
public void SetupDetail(ChipSphereIconButton.Parameter parameter) { switch (parameter.menuType) { case CMD_ChipSphere.MenuType.Empty: NGUIUtil.ChangeUITextureFromFileASync(this.chipTexture, "ChipThumbnail/Chip_Empty", false, null); NGUITools.SetActiveSelf(this.chipTexture.gameObject, true); NGUITools.SetActiveSelf(this.chipNameLabel.gameObject, false); NGUITools.SetActiveSelf(this.rareSprite.gameObject, false); NGUITools.SetActiveSelf(this.chipLookTexture.gameObject, false); NGUITools.SetActiveSelf(this.lookGO, false); this.messageLabel.text = StringMaster.GetString("ChipInstalling-03"); this.buttonLabel.text = StringMaster.GetString("ChipInstalling-04"); this.chipNameLabel.color = Color.white; this.myMenuType = parameter.menuType; this.buttonSprite.spriteName = "Common02_Btn_Green"; this.buttonCollider.enabled = true; this.buttonLabel.color = Color.white; this.buttonLabel.effectColor = this.defaultButtonLabelEffectColor; break; case CMD_ChipSphere.MenuType.Extendable: { NGUIUtil.ChangeUITextureFromFileASync(this.chipTexture, "ChipThumbnail/Chip_NotOpen", true, null); NGUITools.SetActiveSelf(this.lookGO, true); NGUITools.SetActiveSelf(this.rareSprite.gameObject, false); NGUITools.SetActiveSelf(this.chipNameLabel.gameObject, true); NGUITools.SetActiveSelf(this.chipLookTexture.gameObject, false); NGUITools.SetActiveSelf(this.chipTexture.gameObject, true); int itemCount = parameter.itemCount; this.chipNameLabel.text = string.Format("×{0}", itemCount); this.buttonLabel.text = StringMaster.GetString("ChipInstalling-08"); global::Debug.LogFormat("{0} >= {1}, isOpened:{2}", new object[] { this.extendItemCount, itemCount, parameter.isOpened }); bool flag = this.extendItemCount >= itemCount; if (flag) { this.chipNameLabel.color = Color.white; } else { this.chipNameLabel.color = Color.red; } if (flag && parameter.isExtendable) { this.messageLabel.text = StringMaster.GetString("ChipInstalling-07"); this.buttonSprite.spriteName = "Common02_Btn_Green"; this.buttonCollider.enabled = true; this.buttonLabel.color = Color.white; this.buttonLabel.effectColor = this.defaultButtonLabelEffectColor; } else { this.messageLabel.text = StringMaster.GetString("ChipInstalling-11"); this.buttonSprite.spriteName = "Common02_Btn_Gray"; this.buttonCollider.enabled = false; this.buttonLabel.color = ConstValue.DEACTIVE_BUTTON_LABEL; this.buttonLabel.effectColor = ConstValue.DEACTIVE_BUTTON_LABEL; } this.myMenuType = parameter.menuType; break; } case CMD_ChipSphere.MenuType.NotYet: { this.chipNameLabel.text = parameter.chipName; NGUITools.SetActiveSelf(this.rareSprite.gameObject, false); string text = string.Format(StringMaster.GetString("ChipInstalling-10"), parameter.chipDetail); this.messageLabel.text = text; break; } case CMD_ChipSphere.MenuType.Detail: { this.chipNameLabel.text = parameter.chipName; this.messageLabel.text = parameter.chipDetail; NGUIUtil.ChangeUITextureFromFileASync(this.chipTexture, parameter.chipIconPath, false, null); NGUITools.SetActiveSelf(this.chipTexture.gameObject, true); this.rareSprite.spriteName = ChipTools.GetRankPath(parameter.chipRank); NGUITools.SetActiveSelf(this.rareSprite.gameObject, true); this.buttonSprite.spriteName = "Common02_Btn_Red"; this.buttonCollider.enabled = true; this.buttonLabel.color = Color.white; this.buttonLabel.effectColor = this.defaultButtonLabelEffectColor; GameWebAPI.RespDataMA_ChipM.Chip chipEnhancedData = ChipDataMng.GetChipEnhancedData(parameter.ConvertChipId()); if (chipEnhancedData != null) { if (this.reinforcementButtonSprite != null) { this.reinforcementButtonSprite.spriteName = "Common02_Btn_Green"; } if (this.reinforcementButtonCollider != null) { this.reinforcementButtonCollider.enabled = true; } if (this.reinforcementButtonLabel != null) { this.reinforcementButtonLabel.color = Color.white; } if (this.buttonLabel != null) { this.buttonLabel.effectColor = this.defaultReinforcementButtonLabelEffectColor; } } else { if (this.reinforcementButtonSprite != null) { this.reinforcementButtonSprite.spriteName = "Common02_Btn_Gray"; } if (this.reinforcementButtonCollider != null) { this.reinforcementButtonCollider.enabled = false; } if (this.reinforcementButtonLabel != null) { this.reinforcementButtonLabel.color = ConstValue.DEACTIVE_BUTTON_LABEL; } if (this.buttonLabel != null) { this.buttonLabel.effectColor = ConstValue.DEACTIVE_BUTTON_LABEL; } } break; } } }
public void SetupIcon(GameWebAPI.RespDataCS_MonsterSlotInfoListLogic.Equip equip) { GameWebAPI.RespDataMA_ChipM.Chip chipData = ChipTools.GetChipData(equip); this.SetupIcon(chipData); }
public void SetRankSprite(string rank) { this.rankSprite.spriteName = ChipTools.GetRankPath(rank); }
private ChipSphereIconButton.Parameter CreateParameter(int myGrowStep, int myArousal, int buttonNo) { int type = 0; CMD_ChipSphere.MenuType menuType = CMD_ChipSphere.MenuType.Empty; string chipName = string.Empty; string chipDetail = string.Empty; int userChipId = 0; int itemCount = 0; GameWebAPI.RespDataCS_MonsterSlotInfoListLogic.Manage slotStatus = CMD_ChipSphere.DataChg.GetChipEquip().GetSlotStatus(); int num = slotStatus.maxSlotNum + slotStatus.extraSlotNum; if (buttonNo == 1) { if (MonsterGrowStepData.IsRipeScope(myGrowStep) || MonsterGrowStepData.IsPerfectScope(myGrowStep) || MonsterGrowStepData.IsUltimateScope(myGrowStep)) { menuType = CMD_ChipSphere.MenuType.Empty; } else { menuType = CMD_ChipSphere.MenuType.NotYet; string growStepName = MonsterGrowStepData.GetGrowStepName(5.ToString()); chipName = growStepName; string @string = StringMaster.GetString("ChipInstallingEvolutionInfo"); chipDetail = string.Format(@string, growStepName); } } else if (buttonNo == 2) { if (MonsterGrowStepData.IsPerfectScope(myGrowStep) || MonsterGrowStepData.IsUltimateScope(myGrowStep)) { menuType = CMD_ChipSphere.MenuType.Empty; } else { menuType = CMD_ChipSphere.MenuType.NotYet; string growStepName2 = MonsterGrowStepData.GetGrowStepName(6.ToString()); chipName = growStepName2; string string2 = StringMaster.GetString("ChipInstallingEvolutionInfo"); chipDetail = string.Format(string2, growStepName2); } } else if (buttonNo == 3) { if (MonsterGrowStepData.IsUltimateScope(myGrowStep)) { menuType = CMD_ChipSphere.MenuType.Empty; } else { menuType = CMD_ChipSphere.MenuType.NotYet; string growStepName3 = MonsterGrowStepData.GetGrowStepName(7.ToString()); chipName = growStepName3; string string3 = StringMaster.GetString("ChipInstallingEvolutionInfo"); chipDetail = string.Format(string3, growStepName3); this.chipSphereLines.OpenMiddleToLeftUp(ChipSphereLines.LineType.None); } } else if (buttonNo == 4) { if (myArousal >= 2) { menuType = CMD_ChipSphere.MenuType.Empty; } else { menuType = CMD_ChipSphere.MenuType.NotYet; string string4 = StringMaster.GetString("CharaStatus-23"); chipName = string.Format("{0}{1}", string4, 2); chipDetail = string4; this.chipSphereLines.OpenMiddleToRightDown(ChipSphereLines.LineType.None); } } else if (buttonNo == 5) { if (myArousal >= 4) { menuType = CMD_ChipSphere.MenuType.Empty; } else { menuType = CMD_ChipSphere.MenuType.NotYet; string string5 = StringMaster.GetString("CharaStatus-23"); chipName = string.Format("{0}{1}", string5, 4); chipDetail = string5; this.chipSphereLines.OpenMiddleToRightUp(ChipSphereLines.LineType.None); } } else if (buttonNo >= 6) { type = 1; itemCount = ConstValue.CHIP_EXTEND_SLOT_NEEDS[buttonNo - 6]; if (buttonNo <= num) { menuType = CMD_ChipSphere.MenuType.Empty; } else { menuType = CMD_ChipSphere.MenuType.Extendable; } } if (CMD_ChipSphere.DataChg.GetSlotEquip() == null) { global::Debug.Log("装着はありません."); } else { foreach (GameWebAPI.RespDataCS_MonsterSlotInfoListLogic.Equip equip in CMD_ChipSphere.DataChg.GetSlotEquip()) { int num2 = ChipTools.ConvertToButtonNo(equip); if (buttonNo == num2) { menuType = CMD_ChipSphere.MenuType.Detail; userChipId = equip.userChipId; break; } } } return(new ChipSphereIconButton.Parameter { type = type, buttonNo = buttonNo, menuType = menuType, itemCount = itemCount, chipName = chipName, chipDetail = chipDetail, userChipId = userChipId }); }