コード例 #1
0
 void OnEndOfAttack(BaseEventParameters baseParams)
 {
     EndOfAttackEventParameters endOfAttackEvent = (EndOfAttackEventParameters)baseParams;
     if (m_AttackComponent.GetCurrentAttackLogic() == null || m_AttackComponent.CheckIsCurrentAttack(endOfAttackEvent.m_Attack))
     {
         m_CurrentAttack = null;
     }
 }
コード例 #2
0
    void EndOfAttack(BaseEventParameters baseParams)
    {
        EndOfAttackEventParameters endOfAttackParams = (EndOfAttackEventParameters)baseParams;

        ChronicleManager.AddChronicle(gameObject, EChronicleCategory.Movement, "On end of attack : " + endOfAttackParams.m_Attack);
        if (m_IsMovementBlocked)
        {
            // We need to check m_AttackComponent.GetCurrentAttack().m_AnimationAttackName AND m_AttackComponent.GetCurrentAttackLogic().GetAnimationAttackName() because for ProjectileAttack,
            // it can happen that a different animation is triggered due to guard crush property, so the animation attack name is changed at runtime
            if (m_AttackComponent.GetCurrentAttack() == null ||
                m_AttackComponent.GetCurrentAttack().m_AnimationAttackName == endOfAttackParams.m_Attack ||
                m_AttackComponent.GetCurrentAttackLogic().GetAnimationAttackName() == endOfAttackParams.m_Attack.ToString())
            {
                SetMovementBlocked(false, EBlockedReason.EndAttack);
            }
        }
    }