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; }
private void OnActionEnter(SkillActionBehaviour behaviour) { if (behaviour.parentSkill != currentSkill.info) { return; } if (behaviour.actionIndex < 0 || behaviour.actionIndex >= currentSkill.info.SkillActions.Count) { return; } if (currentSkill.info.SkillActions[behaviour.actionIndex] != currentAction) { return; } behaviour.runtimeAction = currentAction; //TODO 消耗MP之类的操作 }