40 lines
942 B
C++
40 lines
942 B
C++
#include "CEntity.hpp"
|
|
#include "nlohmann/json_fwd.hpp"
|
|
|
|
#include <functional>
|
|
|
|
namespace CosmicCore
|
|
{
|
|
|
|
CEntity::CEntity(std::reference_wrapper<EntityComponentManager> registry, EntityId handle, CScene* scene) : CSerializable(), m_scene(scene), m_registryReference(registry), m_handle(handle)
|
|
{
|
|
}
|
|
|
|
CEntity::CEntity(const CEntity& cop): m_scene(cop.m_scene), m_registryReference(cop.m_registryReference), m_handle(cop.m_handle){
|
|
|
|
}
|
|
|
|
CEntity& CEntity::operator=(const CEntity& ent)
|
|
{
|
|
m_handle = ent.m_handle;
|
|
m_registryReference = ent.m_registryReference;
|
|
m_scene = ent.m_scene;
|
|
return *this;
|
|
}
|
|
|
|
CScene* CEntity::getScene()
|
|
{
|
|
return m_scene;
|
|
}
|
|
|
|
void CEntity::setScene(CScene* s)
|
|
{
|
|
m_scene = s;
|
|
}
|
|
|
|
/*CEntity CEntity::getParent() {
|
|
//to implement
|
|
}*/
|
|
|
|
nlohmann::json CEntity::to_json(){return nlohmann::json();};
|
|
} |