Added physics function to control sleeping behavior
This commit is contained in:
@@ -137,6 +137,16 @@ namespace Ndk
|
||||
m_entity->Invalidate();
|
||||
}
|
||||
|
||||
/*!
|
||||
TODO
|
||||
*/
|
||||
inline void PhysicsComponent2D::ForceSleep()
|
||||
{
|
||||
NazaraAssert(m_object, "Invalid physics object");
|
||||
|
||||
return m_object->ForceSleep();
|
||||
}
|
||||
|
||||
/*!
|
||||
TODO
|
||||
*/
|
||||
@@ -648,6 +658,16 @@ namespace Ndk
|
||||
m_object->UpdateVelocity(gravity, damping, deltaTime);
|
||||
}
|
||||
|
||||
/*!
|
||||
TODO
|
||||
*/
|
||||
inline void PhysicsComponent2D::Wakeup()
|
||||
{
|
||||
NazaraAssert(m_object, "Invalid physics object");
|
||||
|
||||
return m_object->Wakeup();
|
||||
}
|
||||
|
||||
inline void PhysicsComponent2D::ApplyPhysicsState(Nz::RigidBody2D& rigidBody) const
|
||||
{
|
||||
assert(m_pendingStates.valid);
|
||||
|
||||
Reference in New Issue
Block a user