32 lines
667 B
C++
32 lines
667 B
C++
|
|
#include "CEntity.hpp"
|
||
|
|
#include "nlohmann/json_fwd.hpp"
|
||
|
|
|
||
|
|
#include <memory>
|
||
|
|
|
||
|
|
namespace CosmicCore
|
||
|
|
{
|
||
|
|
|
||
|
|
CEntity::CEntity(ECManager& registry, EntityId handle) : CSerializable(), m_registryReference(registry), m_handle(handle)
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
CEntity::CEntity(const CEntity& cop): m_registryReference(cop.m_registryReference), m_handle(cop.m_handle){
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
std::weak_ptr<CScene> CEntity::getScene()
|
||
|
|
{
|
||
|
|
return m_scene;
|
||
|
|
}
|
||
|
|
|
||
|
|
void CEntity::setScene(std::weak_ptr<CScene> s)
|
||
|
|
{
|
||
|
|
m_scene = s;
|
||
|
|
}
|
||
|
|
|
||
|
|
CEntity CEntity::getParent() {
|
||
|
|
//to implement
|
||
|
|
}
|
||
|
|
|
||
|
|
nlohmann::json CEntity::to_json(){return nlohmann::json();};
|
||
|
|
}
|