From 6db8cc7efc46cf6affe7e570955a866f5b5cd4e1 Mon Sep 17 00:00:00 2001 From: StratiX0 Date: Thu, 25 Apr 2024 10:37:45 +0200 Subject: [PATCH] style: GetGrounded() => IsGrounded() --- enginecustom/applicationclass.cpp | 2 +- enginecustom/object.cpp | 2 +- enginecustom/object.h | 2 +- enginecustom/physics.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/enginecustom/applicationclass.cpp b/enginecustom/applicationclass.cpp index 105aac2..f56b360 100644 --- a/enginecustom/applicationclass.cpp +++ b/enginecustom/applicationclass.cpp @@ -789,7 +789,7 @@ bool ApplicationClass::Frame(InputClass* Input) { forceY = 40.0f; } - if (keyDown && !object->GetGrounded()) + if (keyDown && !object->IsGrounded()) { forceY = -40.0f; } diff --git a/enginecustom/object.cpp b/enginecustom/object.cpp index ea0f053..335e3bb 100644 --- a/enginecustom/object.cpp +++ b/enginecustom/object.cpp @@ -209,7 +209,7 @@ void Object::SetGrounded(bool isGrounded) m_isGrounded = isGrounded; } -bool Object::GetGrounded() const +bool Object::IsGrounded() const { return m_isGrounded; } diff --git a/enginecustom/object.h b/enginecustom/object.h index db82b29..4f939dd 100644 --- a/enginecustom/object.h +++ b/enginecustom/object.h @@ -35,7 +35,7 @@ public: void SetMass(float); float GetMass() const; void SetGrounded(bool); - bool GetGrounded() const; + bool IsGrounded() const; void UpdateWorldMatrix(); void UpdateSRMatrix(); diff --git a/enginecustom/physics.cpp b/enginecustom/physics.cpp index 47b41d7..36370b3 100644 --- a/enginecustom/physics.cpp +++ b/enginecustom/physics.cpp @@ -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();