/** * Get entities in group.. * @return {@code EBag} of entities in group. Returns empty bag if group contains no entities. */ public static EBag withGroup(String groupName) { if(_processingMapper==null) throw new RuntimeException("SuperMapper system must be registered before any systems using E().");; return new EBag((com.artemis.utils.IntBag)_processingMapper.getWorld().getSystem(com.artemis.managers.GroupManager.class).getEntityIds(groupName)); }
/** * Get entities in group.. * @return {@code EBag} of entities in group. Returns empty bag if group contains no entities. */ public static EBag withGroup(String groupName) { if(_processingMapper==null) throw new RuntimeException("SuperMapper system must be registered before any systems using E().");; return new EBag((com.artemis.utils.IntBag)_processingMapper.getWorld().getSystem(com.artemis.managers.GroupManager.class).getEntityIds(groupName)); }
/** * Get all entities matching aspect. * For performance reasons do not create the aspect every call. * @return {@code EBag} of entities matching aspect. Returns empty bag if no entities match aspect. */ public static EBag withAspect(Aspect.Builder aspect) { if(_processingMapper==null) throw new RuntimeException("SuperMapper system must be registered before any systems using E().");; return new EBag(_processingMapper.getWorld().getAspectSubscriptionManager().get(aspect).getEntities()); }
/** * Get all entities matching aspect. * For performance reasons do not create the aspect every call. * @return {@code EBag} of entities matching aspect. Returns empty bag if no entities match aspect. */ public static EBag withAspect(Aspect.Builder aspect) { if(_processingMapper==null) throw new RuntimeException("SuperMapper system must be registered before any systems using E().");; return new EBag(_processingMapper.getWorld().getAspectSubscriptionManager().get(aspect).getEntities()); }
/** * Get all entities with component. * This is a relatively costly operation. For performance use withAspect instead. * @return {@code EBag} of entities matching aspect. Returns empty bag if no entities match aspect. */ public static EBag withComponent(Class<? extends Component> component) { if(_processingMapper==null) throw new RuntimeException("SuperMapper system must be registered before any systems using E().");; return new EBag(_processingMapper.getWorld().getAspectSubscriptionManager().get(Aspect.all(component)).getEntities()); }
/** * Get all entities with component. * This is a relatively costly operation. For performance use withAspect instead. * @return {@code EBag} of entities matching aspect. Returns empty bag if no entities match aspect. */ public static EBag withComponent(Class<? extends Component> component) { if(_processingMapper==null) throw new RuntimeException("SuperMapper system must be registered before any systems using E().");; return new EBag(_processingMapper.getWorld().getAspectSubscriptionManager().get(Aspect.all(component)).getEntities()); }