private void RefreshSummonChoiceOneSkill() { TransformUtil.ClearChildren(SummonChoiceOneRoot, true); List <PlayerSkillTalentInfo> skillList = PlayerTalentProxy.instance.GetCurPlayerSkillList(PlayerSkillTalentType.SummonThreeChoiceOne); if (skillList == null) { return; } PlayerSkillTalentInfo info; for (int i = 0, count = skillList.Count; i < count; i++) { info = skillList[i]; SkillTalentButton btn = Instantiate <SkillTalentButton>(skillButtonPrefab); btn.gameObject.SetActive(true); btn.transform.SetParent(SummonChoiceOneRoot, false); btn.name = i.ToString(); btn.SetInfo(info); if (info.IsCarry) { _activeSummonId = info.id; } } summonChoiceOneText.text = string.Format(Localization.Get("ui.player_cultivate_view.choice"), _activeSummonId == 0 ? 0 : 1); }
private IEnumerator InitSelectTipCoroutine(SkillTalentButton btn) { yield return(null); if (_currentClickSkillInfo == null && btn != null) { RefreshSelectTip(btn.info, btn.transform.position); } }
public void ClickSkillButton(SkillTalentButton btn) { RefreshSelectTip(btn.info, btn.transform.position); Debugger.Log("ClickSkillButton:{0}", btn.info.id); if (btn.info.talentData.groupType == PlayerSkillTalentType.PassiveThreeChoiceOne && btn.info.level > 0) { _activePassiveId = btn.info.id; PlayerController.instance.CLIENT2LOBBY_TALENT_CHOOSE_REQ(_activePassiveId, _activeSummonId); } else if (btn.info.talentData.groupType == PlayerSkillTalentType.SummonThreeChoiceOne && btn.info.level > 0) { _activeSummonId = btn.info.id; PlayerController.instance.CLIENT2LOBBY_TALENT_CHOOSE_REQ(_activePassiveId, _activeSummonId); } }
private void RefreshPassiveSkill() { TransformUtil.ClearChildren(PassiveRoot, true); List <PlayerSkillTalentInfo> skillList = PlayerTalentProxy.instance.GetCurPlayerSkillList(PlayerSkillTalentType.PassiveNormal); if (skillList == null) { return; } PlayerSkillTalentInfo info; for (int i = 0, count = skillList.Count; i < count; i++) { info = skillList[i]; SkillTalentButton btn = Instantiate <SkillTalentButton>(skillButtonPrefab); btn.gameObject.SetActive(true); btn.transform.SetParent(PassiveRoot, false); btn.name = i.ToString(); btn.SetInfo(info); } }