SDK/Entity: Delay component removal until world update
Allows system to freely remove components while updating Former-commit-id: f567d3344f764a0909abc2c4a8f69a580aa585b3 [formerly 77379f40a7773443420058a342dec4c02e563053] [formerly 1313a164a686c915c8c54e1dfb367757499b45e9 [formerly f69b0a2a5fd0c3a640c19409baa3f467d231b566]] Former-commit-id: 19aeaebcb33056b67e788d5ef485179ed17b2fd8 [formerly fe85c2fcf3851834f70d0573617a15be31e02e50] Former-commit-id: 527c9fd9571f405b0963123c158ef1e4b42f28ad
This commit is contained in:
@@ -52,8 +52,8 @@ namespace Ndk
|
||||
inline bool IsEnabled() const;
|
||||
inline bool IsValid() const;
|
||||
|
||||
void RemoveAllComponents();
|
||||
void RemoveComponent(ComponentIndex index);
|
||||
inline void RemoveAllComponents();
|
||||
inline void RemoveComponent(ComponentIndex index);
|
||||
template<typename ComponentType> void RemoveComponent();
|
||||
|
||||
inline Nz::String ToString() const;
|
||||
@@ -67,6 +67,10 @@ namespace Ndk
|
||||
void Create();
|
||||
void Destroy();
|
||||
|
||||
void DestroyComponent(ComponentIndex index);
|
||||
|
||||
inline Nz::Bitset<>& GetRemovedComponentBits();
|
||||
|
||||
inline void RegisterSystem(SystemIndex index);
|
||||
|
||||
inline void SetWorld(World* world) noexcept;
|
||||
@@ -75,6 +79,7 @@ namespace Ndk
|
||||
|
||||
std::vector<std::unique_ptr<BaseComponent>> m_components;
|
||||
Nz::Bitset<> m_componentBits;
|
||||
Nz::Bitset<> m_removedComponentBits;
|
||||
Nz::Bitset<> m_systemBits;
|
||||
EntityId m_id;
|
||||
World* m_world;
|
||||
|
||||
Reference in New Issue
Block a user