style: GetGrounded() => IsGrounded()

This commit is contained in:
StratiX0 2024-04-25 10:37:45 +02:00
parent a7d40865e1
commit 6db8cc7efc
4 changed files with 4 additions and 4 deletions

View File

@ -789,7 +789,7 @@ bool ApplicationClass::Frame(InputClass* Input)
{ {
forceY = 40.0f; forceY = 40.0f;
} }
if (keyDown && !object->GetGrounded()) if (keyDown && !object->IsGrounded())
{ {
forceY = -40.0f; forceY = -40.0f;
} }

View File

@ -209,7 +209,7 @@ void Object::SetGrounded(bool isGrounded)
m_isGrounded = isGrounded; m_isGrounded = isGrounded;
} }
bool Object::GetGrounded() const bool Object::IsGrounded() const
{ {
return m_isGrounded; return m_isGrounded;
} }

View File

@ -35,7 +35,7 @@ public:
void SetMass(float); void SetMass(float);
float GetMass() const; float GetMass() const;
void SetGrounded(bool); void SetGrounded(bool);
bool GetGrounded() const; bool IsGrounded() const;
void UpdateWorldMatrix(); void UpdateWorldMatrix();
void UpdateSRMatrix(); void UpdateSRMatrix();

View File

@ -35,7 +35,7 @@ void Physics::ApplyGravity(Object* object, float dragValue, float frameTime)
return; return;
} }
if (!object->GetGrounded()) // Verify if the object is grounded if (!object->IsGrounded()) // Verify if the object is grounded
{ {
// Calculate the acceleration caused by gravity // Calculate the acceleration caused by gravity
XMVECTOR gravityAcceleration = m_gravity / object->GetMass(); XMVECTOR gravityAcceleration = m_gravity / object->GetMass();