#pragma once #include #include "MinimalEngine.h" #include "Scene/Scene.h" namespace Seele { // An entity describes a part of a scene // It is just a wrapper the ID of a registry class Entity { public: Entity(PScene scene); virtual ~Entity(); template Component& attachComponent(Args&&... args) { return scene->attachComponent(identifier, std::forward(args)...); } template Component& accessComponent() { return scene->accessComponent(identifier); } template const Component& accessComponent() const { return scene->accessComponent(identifier); } protected: PScene scene; entt::entity identifier; }; DEFINE_REF(Entity) } // namespace Seele