| | |
| | | #endif
|
| | |
|
| | | TalentModel model { get { return ModelCenter.Instance.GetModel<TalentModel>(); } }
|
| | | PlayerPackModel pack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | |
| | | DisplayTalentType();
|
| | | DisplaySelectSkill();
|
| | | DisplayTalentPoint();
|
| | | DisplayLevelUp();
|
| | | }
|
| | |
|
| | | void DisplaySkills()
|
| | |
| | | if (requireSeriesPoint != 0 && index < m_SelectConditions.Length)
|
| | | {
|
| | | m_SelectConditions[index].gameObject.SetActive(true);
|
| | | m_SelectConditions[index].text = StringUtility.Contact(0, "/", requireSeriesPoint);
|
| | | m_SelectConditions[index].text = StringUtility.Contact(model.GetSeriesPoint(talentConfig.type,
|
| | | skillConfig.RequireSeries()), "/", requireSeriesPoint);
|
| | | index++;
|
| | | }
|
| | | }
|
| | |
| | | DisplaySkillInfo();
|
| | | DisplayConditions();
|
| | | DisplaySkillEffect();
|
| | | DisplayLevelUp();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | model.selectTalentType = model.selectTalentType == 1 ? 2 : 1;
|
| | | }
|
| | |
|
| | | private void DisplayLevelUp()
|
| | | {
|
| | | TalentSkill talent;
|
| | | if (model.TryGetTalent(model.selectSkill, out talent))
|
| | | {
|
| | | m_AddPointBtnText.text = talent.level >= talent.maxLevel ? "已满级" : "加点";
|
| | | }
|
| | | }
|
| | |
|
| | | private void AddPoint()
|
| | | {
|
| | | TalentSkill talent;
|
| | |
| | |
|
| | | private void ResetPoint()
|
| | | {
|
| | | var count = pack.GetItemCountByID(PackType.rptItem, model.talentResetBook);
|
| | | if (count > 0)
|
| | | {
|
| | | ConfirmCancel.ShowItemConfirm(Language.Get(""), model.talentResetBook, 1, () =>
|
| | | {
|
| | |
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | if (model.storeId != 0)
|
| | | {
|
| | | var storeConfig = Config.Instance.Get<StoreConfig>(model.storeId);
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get(""), Language.Get("", storeConfig.MoneyNumber), (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | | ModelCenter.Instance.GetModel<StoreModel>().SendBuyShopItem(storeConfig, 1);
|
| | | }
|
| | | });
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | void DisplayTalentLayout(TalentTreeScriptable config)
|