SDK/System: Add possibility to disable systems without destroying them
Former-commit-id: 1493cf5e743cf96084588a751ff92bfc35732a6d [formerly bc8fceb313fe789262c13eb9714cdc4b5e43bb8b] [formerly 25a7db8fa5e658180231fc8ad7f1b9e15c560771 [formerly d43ffc393e253069feafa3c82d2d12db6c7c48fc]] Former-commit-id: 7368a2e39183cd6611442f786b9c1f124f803e6b [formerly 421f1b00641d63f9c5a069c90b34c377a5a78f46] Former-commit-id: 9aa635cdb8cc8ebafb78c558d263c63fb3f73670
This commit is contained in:
@@ -27,6 +27,8 @@ namespace Ndk
|
||||
BaseSystem(BaseSystem&&) noexcept = default;
|
||||
virtual ~BaseSystem();
|
||||
|
||||
inline void Enable(bool enable = true);
|
||||
|
||||
virtual BaseSystem* Clone() const = 0;
|
||||
|
||||
bool Filters(const Entity* entity) const;
|
||||
@@ -36,6 +38,8 @@ namespace Ndk
|
||||
inline float GetUpdateRate() const;
|
||||
inline World& GetWorld() const;
|
||||
|
||||
inline bool IsEnabled() const;
|
||||
|
||||
inline bool HasEntity(const Entity* entity) const;
|
||||
|
||||
inline void SetUpdateRate(float updatePerSecond);
|
||||
@@ -86,6 +90,7 @@ namespace Ndk
|
||||
Nz::Bitset<> m_requiredComponents;
|
||||
SystemIndex m_systemIndex;
|
||||
World* m_world;
|
||||
bool m_updateEnabled;
|
||||
float m_updateCounter;
|
||||
float m_updateRate;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user