Sdk/PhysicsComponent2D: Add IsValid() method
This commit is contained in:
parent
2873a60775
commit
54fb983f9e
|
|
@ -61,6 +61,7 @@ namespace Ndk
|
||||||
|
|
||||||
inline bool IsNodeSynchronizationEnabled() const;
|
inline bool IsNodeSynchronizationEnabled() const;
|
||||||
inline bool IsSleeping() const;
|
inline bool IsSleeping() const;
|
||||||
|
inline bool IsValid() const;
|
||||||
|
|
||||||
inline void ResetVelocityFunction();
|
inline void ResetVelocityFunction();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -382,6 +382,18 @@ namespace Ndk
|
||||||
return m_object->IsSleeping();
|
return m_object->IsSleeping();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Checks if this component is bound to a valid rigid body
|
||||||
|
*
|
||||||
|
* A component may not be bound to a rigid body if the component is not bound to an entity or if this entity is being destroyed
|
||||||
|
*
|
||||||
|
* \return true If bound, false otherwise
|
||||||
|
*/
|
||||||
|
inline bool PhysicsComponent2D::IsValid() const
|
||||||
|
{
|
||||||
|
return bool(m_object);
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Reset velocity function to default one
|
* \brief Reset velocity function to default one
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue