12 World* world =
nullptr;
18 bool operator==(
const Entity& other)
const{
19 return world == other.world &&
id == other.GetID();
22 template<
typename T,
typename ... A>
23 T& EmplaceComponent(A&& ... args)
const{
24 return world->EmplaceComponent<T>(id, args...);
28 void DestroyComponent()
const{
29 world->DestroyComponent<T>(id);
33 bool HasComponent()
const{
34 return world->HasComponent<T>(id);
38 bool HasComponentOfBase()
const{
39 return world->HasComponentOfBase<T>(id);
43 auto GetAllComponentsPolymorphic()
const{
44 return world->GetAllComponentsPolymorphic<T>(id);
48 T& GetComponent()
const{
49 return world->GetComponent<T>(id);
57 world->DestroyEntity(
id);
58 id = {INVALID_ENTITY};
62 return EntityIsValid(
id) && world !=
nullptr;
65 World* GetWorld()
const {
69 void SetEntityRenderlayer(renderlayer_t layers)
const{
73 void SetEntityAttributes(perobject_t attributes) {
77 perobject_t GetEntityAttributes()
const {
85 inline void Create(){}