Ndk/Entity: Remove include to Component
Former-commit-id: a209dff2bacf2793d8226671ce2feeeec46e4599
This commit is contained in:
@@ -8,12 +8,13 @@
|
|||||||
#define NDK_ENTITY_HPP
|
#define NDK_ENTITY_HPP
|
||||||
|
|
||||||
#include <Nazara/Core/Bitset.hpp>
|
#include <Nazara/Core/Bitset.hpp>
|
||||||
#include <NDK/Component.hpp>
|
#include <NDK/Algorithm.hpp>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace Ndk
|
namespace Ndk
|
||||||
{
|
{
|
||||||
|
class BaseComponent;
|
||||||
class EntityHandle;
|
class EntityHandle;
|
||||||
class World;
|
class World;
|
||||||
|
|
||||||
|
|||||||
@@ -9,12 +9,6 @@
|
|||||||
|
|
||||||
namespace Ndk
|
namespace Ndk
|
||||||
{
|
{
|
||||||
inline Entity::Entity(World& world, EntityId id) :
|
|
||||||
m_id(id),
|
|
||||||
m_world(&world)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename ComponentType, typename... Args>
|
template<typename ComponentType, typename... Args>
|
||||||
ComponentType& Entity::AddComponent(Args&&... args)
|
ComponentType& Entity::AddComponent(Args&&... args)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
// For conditions of distribution and use, see copyright notice in Prerequesites.hpp
|
// For conditions of distribution and use, see copyright notice in Prerequesites.hpp
|
||||||
|
|
||||||
#include <NDK/Entity.hpp>
|
#include <NDK/Entity.hpp>
|
||||||
|
#include <NDK/BaseComponent.hpp>
|
||||||
#include <NDK/EntityHandle.hpp>
|
#include <NDK/EntityHandle.hpp>
|
||||||
#include <NDK/World.hpp>
|
#include <NDK/World.hpp>
|
||||||
|
|
||||||
@@ -21,6 +22,12 @@ namespace Ndk
|
|||||||
handle->OnEntityMoved(this);
|
handle->OnEntityMoved(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Entity::Entity(World& world, EntityId id) :
|
||||||
|
m_id(id),
|
||||||
|
m_world(&world)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
Entity::~Entity()
|
Entity::~Entity()
|
||||||
{
|
{
|
||||||
Destroy();
|
Destroy();
|
||||||
|
|||||||
Reference in New Issue
Block a user