Search in sources :

Example 1 with GroupEvent

use of ilargia.entitas.group.GroupEvent in project Entitas-Java by Rubentxu.

the class Collector method activate.

@Override
public void activate() {
    for (int i = 0; i < _groups.length; i++) {
        Group group = (Group) _groups[i];
        GroupEvent groupEvent = _groupEvents[i];
        switch(groupEvent) {
            case Added:
                group.OnEntityAdded(_addEntityCache);
                break;
            case Removed:
                group.OnEntityRemoved(_addEntityCache);
                break;
            case AddedOrRemoved:
                group.OnEntityAdded(_addEntityCache);
                group.OnEntityRemoved(_addEntityCache);
                break;
        }
    }
}
Also used : IGroup(ilargia.entitas.api.IGroup) Group(ilargia.entitas.group.Group) GroupEvent(ilargia.entitas.group.GroupEvent)

Aggregations

IGroup (ilargia.entitas.api.IGroup)1 Group (ilargia.entitas.group.Group)1 GroupEvent (ilargia.entitas.group.GroupEvent)1