(Entity) Added components bits

Moved [Add/Remove]Component implementation to .cpp


Former-commit-id: e61e8c57911c2e106e6c0959b692a006b8f58c40
This commit is contained in:
Lynix
2015-03-17 12:34:03 +01:00
parent 99e0912163
commit 0ba034f7e9
3 changed files with 44 additions and 31 deletions

View File

@@ -7,6 +7,7 @@
#ifndef NDK_ENTITY_HPP
#define NDK_ENTITY_HPP
#include <Nazara/Core/Bitset.hpp>
#include <NDK/Component.hpp>
#include <memory>
#include <vector>
@@ -35,6 +36,7 @@ namespace Ndk
BaseComponent& GetComponent(nzUInt32 componentId);
template<typename ComponentType> ComponentType& GetComponent();
const NzBitset<>& GetComponentBits() const;
Id GetId() const;
World* GetWorld() const;
@@ -64,6 +66,7 @@ namespace Ndk
std::vector<std::unique_ptr<BaseComponent>> m_components;
std::vector<EntityHandle*> m_handles;
Id m_id;
NzBitset<> m_componentBits;
World* m_world;
bool m_valid;
};