@Override public void updatedComponentState(int entityId, int componentIndex, Object[] values) { for (int i = 0, n = _listeners.size(); i < n; ++i) { EntityTrackerCommunicator communicator = _listeners.get(i); communicator.updatedComponentState(entityId, componentIndex, values); } }
@Override public void addedEntity(int entityId, BitSet components) { for (int i = 0, n = _listeners.size(); i < n; ++i) { EntityTrackerCommunicator communicator = _listeners.get(i); communicator.addedEntity(entityId, components); } _entities.put(entityId, components); }
@Override public void addedComponentType(int index, ComponentTypeInfo info) { for (int i = 0, n = _listeners.size(); i < n; ++i) { EntityTrackerCommunicator communicator = _listeners.get(i); communicator.addedComponentType(index, info); } _componentTypes.set(index, info); }
@Override public void addedManager(String name) { for (int i = 0, n = _listeners.size(); i < n; ++i) { EntityTrackerCommunicator communicator = _listeners.get(i); communicator.addedManager(name); } _managers.add(name); }
@Override public void deletedEntity(int entityId) { for (int i = 0, n = _listeners.size(); i < n; ++i) { EntityTrackerCommunicator communicator = _listeners.get(i); communicator.deletedEntity(entityId); } _entities.remove(entityId); }
@Override public void updatedEntitySystem(int systemIndex, int entitiesCount, int maxEntitiesCount) { for (int i = 0, n = _listeners.size(); i < n; ++i) { EntityTrackerCommunicator communicator = _listeners.get(i); communicator.updatedEntitySystem(systemIndex, entitiesCount, maxEntitiesCount); } _entitySystemsEntitiesCount.set(systemIndex, entitiesCount); _entitySystemsMaxEntitiesCount.set(systemIndex, maxEntitiesCount); }
@Override public void addedSystem( int index, String name, BitSet allTypes, BitSet oneTypes, BitSet notTypes) { for (int i = 0, n = _listeners.size(); i < n; ++i) { EntityTrackerCommunicator communicator = _listeners.get(i); communicator.addedSystem(index, name, allTypes, oneTypes, notTypes); } _systems.add(Tuple3.create(index, name, new AspectInfo(allTypes, oneTypes, notTypes))); _entitySystemsEntitiesCount.set(index, 0); _entitySystemsMaxEntitiesCount.set(index, 0); }