style: GetGrounded() => IsGrounded()
This commit is contained in:
parent
a7d40865e1
commit
6db8cc7efc
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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();
|
||||||
|
@ -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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user