public void OnClick() { TalentInfo_.Info.SetActive(true); TalentInfo_.Info.SetTitle(talent.Title); TalentInfo_.Info.SetDesc(talent.Desc); switch (eShowPenalties) { case EShowPenaltiesType.eShowPenalties: TalentInfo_.Info.SetPenaltyNow(talent.GetFormatedCurrentPenalties()); TalentInfo_.Info.SetPenaltyNext(talent.GetFormatedNextPenalties()); break; case EShowPenaltiesType.eShowPercentage: TalentInfo_.Info.SetPenaltyNow(talent.GetFormatedCurrentBonusPrecentages()); TalentInfo_.Info.SetPenaltyNext(talent.GetFormatedBonusNextPercentages()); break; case EShowPenaltiesType.eNone: TalentInfo_.Info.SetPenaltyNow(""); TalentInfo_.Info.SetPenaltyNext(""); break; } if (bActive) { TalentInfo_.Info.m_Button.interactable = true; TalentInfo_.Info.m_Button.onClick.RemoveAllListeners(); TalentInfo_.Info.m_Button.onClick.AddListener(IncreaseTalentLevel); } else { TalentInfo_.Info.m_Button.interactable = false; } TalentInfo_.Info.SetPenaltyPlusOne(plusOneText); }