15 class Entity :
public std::enable_shared_from_this<Entity> {
17 std::shared_ptr<Transform> transform;
45 std::list<std::shared_ptr<Component>>&
getComponents() noexcept;
57 void setActive(const
bool active) noexcept;
std::list< std::shared_ptr< Component > > components
Definition: entity.h:20
Entity()
Entity constructor.
Definition: entity.cpp:5
bool isActive() const noexcept
Determines if active.
Definition: entity.cpp:48
Class for entity in the engine.
Definition: entity.h:15
std::shared_ptr< Transform > getTransform() const noexcept
Gets the transform.
Definition: entity.cpp:37
std::list< std::shared_ptr< Component > > & getComponents() noexcept
Gets the components.
Definition: entity.cpp:33
void addComponent(std::shared_ptr< Component > component)
Adds a component.
Definition: entity.cpp:9
void setActive(const bool active) noexcept
Sets entity active or inactive.
Definition: entity.cpp:41
void removeComponent(std::shared_ptr< Component > component)
Removes a component.
Definition: entity.cpp:23