21#ifndef GF_ENTITY_CONTAINER_H
22#define GF_ENTITY_CONTAINER_H
27#include "GraphicsApi.h"
29#include "RenderStates.h"
33#ifndef DOXYGEN_SHOULD_SKIP_THIS
125 static_assert(std::is_base_of<Entity, E>::value,
"E must be an Entity");
126 return static_cast<E*
>(removeEntity(entity));
132 std::vector<Ref<Entity>> m_entities;
135#ifndef DOXYGEN_SHOULD_SKIP_THIS
A collection of entities.
Definition: EntityContainer.h:60
void render(RenderTarget &target, const RenderStates &states=RenderStates())
Render the entities on the target.
void addEntity(Entity &entity)
Add an entity to the collection.
E * removeTypedEntity(E *entity)
Remove a typed entity from the collection.
Definition: EntityContainer.h:124
void update(Time time)
Update the entities.
Entity * removeEntity(Entity *entity)
Remove an entity from the collection.
A game entity.
Definition: Entity.h:53
Base class for all render targets (window, texture, ...)
Definition: RenderTarget.h:102
Represents a time value.
Definition: Time.h:65
The namespace for gf classes.
Define the states used for drawing to a RenderTarget.
Definition: RenderStates.h:82