private void ShowNextMonsterData() { this.ngTX_MONS_NEXT_NAME.text = this.data.md_next.monsterMG.monsterName; this.ngTX_MONS_NEXT_SKILL.text = MonsterTribeData.GetTribeName(this.data.md_next.monsterMG.tribe); this.specificTypeName.text = MonsterSpecificTypeData.GetSpecificTypeName(this.data.md_next.monsterMG.monsterStatusId); int num = 0; if (this.evolutionType == "1" || this.evolutionType == "3" || this.evolutionType == "4") { string monsterId = this.data.md_next.monsterM.monsterId; num = EvolutionData.CalcClusterForEvolve(monsterId); } else if (this.evolutionType == "5") { string monsterId2 = this.data.md.monsterM.monsterId; num = EvolutionData.CalcClusterForVersionUp(monsterId2); } else if (this.evolutionType == "2") { string monsterId3 = this.data.md_next.monsterM.monsterId; num = EvolutionData.CalcClusterForModeChange(monsterId3); } this.ngTX_NEED_CHIP.text = StringFormat.Cluster(num); int num2 = int.Parse(DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.gamemoney); if (num2 < num) { this.ngTX_NEED_CHIP.color = Color.red; } }
public void Initialize(Action <EvolutionData.MonsterEvolveData, int> evolutionAction) { this.onEvolution = evolutionAction; this.evolutionType = ClassSingleton <EvolutionData> .Instance.GetEvolutionEffectType(this.data.md.userMonster.monsterId, this.data.md_next.userMonster.monsterId); this.ngTAG_NEED_CHIP.text = StringMaster.GetString("SystemCost"); this.myCluster = int.Parse(DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.gamemoney); if (this.evolutionType == "1" || this.evolutionType == "3" || this.evolutionType == "4") { this.needCluster = EvolutionData.CalcClusterForEvolve(this.data.md_next.monsterM.monsterId); } else if (this.evolutionType == "5") { this.needCluster = EvolutionData.CalcClusterForVersionUp(this.data.md_next.monsterM.monsterId); } else if (this.evolutionType == "2") { this.needCluster = EvolutionData.CalcClusterForModeChange(this.data.md_next.monsterM.monsterId); } this.ShowNextMonsterIcon(); this.ShowNextMonsterData(); this.executionButton.Initialize(new Action <CMD>(this.OnPushConfirmYesButton)); UILabel component = this.goCAN_EVOLVE.GetComponent <UILabel>(); if (this.CanEvolve()) { if (this.evolutionType == "2") { if (this.myCluster < this.needCluster) { component.text = string.Format(StringMaster.GetString("EvolutionImpossible"), this.GetEvolutionName()); this.SetDeactiveButton(); } else { this.SetActiveButton(); } } else if (this.evolutionType == "1" || this.evolutionType == "3" || this.evolutionType == "4" || this.evolutionType == "5") { if (this.myCluster < this.needCluster) { component.text = string.Format(StringMaster.GetString("EvolutionImpossible"), this.GetEvolutionName()); this.SetDeactiveButton(); } else { int num = int.Parse(this.data.md.userMonster.level); int num2 = int.Parse(this.data.md.monsterM.maxLevel); if (num >= num2) { this.SetActiveButton(); } else { component.text = StringMaster.GetString("EvolutionNotEnoughLv"); this.SetDeactiveButton(); } } } else { global::Debug.LogError("進化タイプエラー."); } } else { component.text = string.Format(StringMaster.GetString("EvolutionImpossible"), this.GetEvolutionName()); this.SetDeactiveButton(); } }