Пример #1
0
 private void FixedUpdate()
 {
     if(m_Collider.enabled)
     {
         if (m_Controller.IsJumping() && !m_StunInfoSC.IsStunned())
         {
             if (m_Controller.IsJumpApexReached())
             {
                 UpdateFallingTrajectory();
             }
         }
     }
 }
Пример #2
0
    private bool CanBlockGrabAttack(PlayerBaseAttackLogic attackLogic)
    {
        // Can't blocked grab attack when stunned
        if (!m_StunInfoSC.IsStunned())
        {
            if (m_AttackComponent)
            {
                // Check if we are playing grab attack as well
                if (m_AttackComponent.GetCurrentAttackLogic() is PlayerGrabAttackLogic grabAttack)
                {
                    return(grabAttack.GetGrabPhase() == EGrabPhase.Startup);
                }
            }
        }

        return(false);
    }
Пример #3
0
 private void ControlPushbackVelocity()
 {
     if (m_HasPushback)
     {
         if (m_StunInfoSC.IsStunned())
         {
             Vector2 rbVel = m_Rigidbody2D.velocity;
             if (m_MaxPushbackXVelocity > 0f)
             {
                 rbVel.x = Mathf.Min(rbVel.x, m_MaxPushbackXVelocity);
             }
             else
             {
                 rbVel.x = Mathf.Max(rbVel.x, m_MaxPushbackXVelocity);
             }
             m_Rigidbody2D.velocity = rbVel;
             m_MaxPushbackXVelocity = rbVel.x;
         }
         else
         {
             m_HasPushback = false;
         }
     }
 }
 private bool CheckProximityGuardConditions()
 {
     return(m_IsInsideProximityBox && !m_PlayerStunInfoSubComponent.IsStunned() && m_PlayerHealthComponent.IsInBlockingStance());
 }