Ejemplo n.º 1
0
 public void UseSkill(SkillAgent skill)
 {
     currentSkill = skill;
     currentskillActions.Clear();
     using (var actionsEnum = skill.info.SkillActions.GetEnumerator())
         while (actionsEnum.MoveNext())
         {
             currentskillActions.Enqueue(actionsEnum.Current);
         }
     skill.OnUse();
     PlayerAnimator.SetTrigger(skill.info.AnimaTriggerName);
     PlayerAnimator.SetInteger(animaAttackIndexNameHash, 0);
 }
Ejemplo n.º 2
0
        public static SkillAgent Create(Skill skill)
        {
            SkillAgent skillAgent = new SkillAgent();
            bool       bOK        = skillAgent.btload(skill.SkillConfig.SkillTree);

            if (bOK)
            {
                skillAgent.btsetcurrent(skill.SkillConfig.SkillTree);

                skillAgent.skill = skill;

                return(skillAgent);
            }
            return(null);
        }
Ejemplo n.º 3
0
 private void OnActionExit(SkillActionBehaviour behaviour)
 {
     if (!nextAction)//这种情况下,技能已经施放完毕或中断
     {
         PlayerAnimator.SetInteger(animaAttackIndexNameHash, -1);
         currentAction = null;
         currentSkill  = null;
         return;
     }
     if (behaviour.runtimeAction != currentAction)
     {
         return;
     }
     currentAction = nextAction;
     nextAction    = null;
 }
Ejemplo n.º 4
0
 protected void Skill_ManageAgents(object sender, UcControlArgs e)
 {
     SkillAgent.SkillId = e.Id;
     SkillAgent.UcDataBind();
     mvGroup.ActiveViewIndex = 1;
 }