private void FixedUpdate() { if(m_Collider.enabled) { if (m_Controller.IsJumping() && !m_StunInfoSC.IsStunned()) { if (m_Controller.IsJumpApexReached()) { UpdateFallingTrajectory(); } } } }
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); }
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()); }