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

@@ -35,6 +35,7 @@ namespace Ndk
inline const std::vector<EntityHandle>& GetEntities() const;
inline SystemIndex GetIndex() const;
inline int GetUpdateOrder() const;
inline float GetUpdateRate() const;
inline World& GetWorld() const;
@@ -42,6 +43,7 @@ namespace Ndk
inline bool HasEntity(const Entity* entity) const;
void SetUpdateOrder(int updateOrder);
inline void SetUpdateRate(float updatePerSecond);
inline void Update(float elapsedTime);
@@ -93,6 +95,7 @@ namespace Ndk
bool m_updateEnabled;
float m_updateCounter;
float m_updateRate;
int m_updateOrder;
static SystemIndex s_nextIndex;
};