//停止无效的攻击动作,在每个trigger的前后各有一个 void StopInvalidAttack(AnimationEvent animEvent) { ActorProp selfProp = transform.parent.GetComponent <ActorProp>(); if (null == selfProp) { Debug.LogWarning("StopAction return, actorProp get failed"); return; } Actor self = selfProp.ActorLogicObj; if (null != self && !self.IsDead) { AttackAction action = self.ActionControl.LookupAction(AttackAction.SGetActionType()) as AttackAction; if (action != null) { action.StopInvalidAttack(); } } }