/** * Returns a bag of all components this entity has. * <p> * You need to reset the bag yourself if you intend to fill it more than * once. * </p> * @param fillBag * the bag to put the components into * @return the fillBag containing the components */ public Bag<Component> getComponents(Bag<Component> fillBag) { return world.getComponentManager().getComponentsFor(id, fillBag); }
/** * Returns a bag of all components this entity has. * <p> * You need to reset the bag yourself if you intend to fill it more than * once. * </p> * @param fillBag * the bag to put the components into * @return the fillBag containing the components */ public Bag<Component> getComponents(Bag<Component> fillBag) { return world.getComponentManager().getComponentsFor(id, fillBag); }
public ArchetypeMapper(World world, IntBag toSave) { int[] ids = toSave.getData(); Bag<Component> components = new Bag<Component>(); Bag<Class<? extends Component>> types = new Bag<Class<? extends Component>>(); for (int i = 0, s = toSave.size(); s > i; i++) { int compositionId = world.getEntity(ids[i]).getCompositionId(); if (!compositionIdMapper.containsKey(compositionId)) { components.clear(); types.clear(); world.getComponentManager().getComponentsFor(ids[i], components); compositionIdMapper.put(compositionId, new TransmuterEntry(toClasses(components, types))); } } }
public ArchetypeMapper(World world, IntBag toSave) { int[] ids = toSave.getData(); Bag<Component> components = new Bag<Component>(); Bag<Class<? extends Component>> types = new Bag<Class<? extends Component>>(); for (int i = 0, s = toSave.size(); s > i; i++) { int compositionId = world.getEntity(ids[i]).getCompositionId(); if (!compositionIdMapper.containsKey(compositionId)) { components.clear(); types.clear(); world.getComponentManager().getComponentsFor(ids[i], components); compositionIdMapper.put(compositionId, new TransmuterEntry(toClasses(components, types))); } } }
world.getComponentManager().getComponentsFor(e.getId(), components); components.sort(comparator);
world.getComponentManager().getComponentsFor(e.getId(), components); components.sort(comparator);
world.getComponentManager().getComponentsFor(e.getId(), components); components.sort(comparator);
world.getComponentManager().getComponentsFor(e.getId(), components); components.sort(comparator);
world.getComponentManager().getComponentsFor(e.getId(), components); components.sort(comparator);