SDK: Allow to set an update order for systems (Closes #106)

This commit is contained in:
Jérôme Leclercq
2016-11-08 02:51:25 +01:00
parent 4570f9a6e1
commit aa304ef2e9
6 changed files with 97 additions and 32 deletions

View File

@@ -16,7 +16,9 @@ namespace Ndk
inline BaseSystem::BaseSystem(SystemIndex systemId) :
m_systemIndex(systemId),
m_updateEnabled(true)
m_world(nullptr),
m_updateEnabled(true),
m_updateOrder(0)
{
SetUpdateRate(30);
}
@@ -33,7 +35,8 @@ namespace Ndk
m_systemIndex(system.m_systemIndex),
m_updateEnabled(system.m_updateEnabled),
m_updateCounter(0.f),
m_updateRate(system.m_updateRate)
m_updateRate(system.m_updateRate),
m_updateOrder(system.m_updateOrder)
{
}
@@ -69,7 +72,18 @@ namespace Ndk
}
/*!
* \brief Gets the rate of update for the system
* \brief Gets the update order of the system
* \return Update order
*
* \see SetUpdateOrder
*/
inline int BaseSystem::GetUpdateOrder() const
{
return m_updateOrder;
}
/*!
* \brief Gets the rate of update of the system
* \return Update rate
*/