Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        private IEnumerator InitSelectTipCoroutine(SkillTalentButton btn)
        {
            yield return(null);

            if (_currentClickSkillInfo == null && btn != null)
            {
                RefreshSelectTip(btn.info, btn.transform.position);
            }
        }
Exemplo n.º 3
0
 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);
     }
 }
Exemplo n.º 4
0
        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);
            }
        }