PFA-OpenGL/OpenGL-Game-Engine — pull request #89 by cesarl (2014-02-09 16:49:43+00:00)
Title: Tag implementation

Tags implemented for Entities.

Entities can have multiple tags (up to 32)
Tags are simple `unsigned int`. If you want to use specific names, define an enum.
enum MyTags
{
ENEMY = 0
, PROJECTILE = 1
, HEROS = 2
};

You can use tags to tag Entities ex :
auto e = createEntity();
e->addTag(ENEMY);

then later you can check if entities have desired tags
if (e->isTagged(ENEMY) && !e->isTagged(HEROS))
{
e->getComponent()->bar();
}

Tags are also used within Entity Filters.
In fact filter have now 2 options
filter.requireComponent();
filter.requireTag(ENEMY);
This filter will take only entities with component `foo` and tagged as `ENEMY`