27 if (isActive ==
false)
30 for (
size_t i = 0, size =
components.size(); i < size; ++i)
56 this->isActive = isActive;
59 void Entity::SetID(uint64_t
Id)
64 void Entity::OnComponentAdded(eastl::weak_ptr<Component> addedComponent)
67 for (
size_t i = 0, size =
components.size() - 1; i < size; ++i)
68 components[i]->OnComponentAdded(addedComponent);
71 void Entity::OnComponentRemoved(eastl::weak_ptr<Component> removedComponent)
73 for (
size_t i = 0, size =
components.size(); i < size; ++i)
74 components[i]->OnComponentRemoved(removedComponent);
77 void Entity::OnBeginContact(eastl::weak_ptr<Entity> entity)
79 for (
size_t i = 0, size =
components.size(); i < size; ++i)
83 void Entity::OnEndContact(eastl::weak_ptr<Entity> entity)
85 for (
size_t i = 0, size =
components.size(); i < size; ++i)
size_t ComponentCount() const
Returns the amount of components on this entity.
bool GetIsActive() const
This method will return the active state of this entity.
eastl::vector< eastl::shared_ptr< Component > > components
virtual void Update()
The general update method of the Entity class.
virtual void InitializeEntity()
uint64_t GetID() const
Returns the currently assigned ID of this entity.
Entity(eastl::string name="")
eastl::vector< eastl::shared_ptr< Component > > GetAllComponents() const
Returns all the components of this entity.
void SetIsActive(bool isActive)
This method will allow you to change the active state of this entity.
static eastl::weak_ptr< Engine > GetEngine() noexcept
This method allows you to get the instance of the Engine. This method will automatically initialize t...
eastl::shared_ptr< Entity > GetPointer() const
Allows you to retrieve current shared pointer from the entity system.