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;
}
if (keyDown && !object->GetGrounded())
if (keyDown && !object->IsGrounded())
{
forceY = -40.0f;
}

View File

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

View File

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

View File

@ -35,7 +35,7 @@ void Physics::ApplyGravity(Object* object, float dragValue, float frameTime)
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
XMVECTOR gravityAcceleration = m_gravity / object->GetMass();