本文整理了Java中com.artemis.Aspect.all()
方法的一些代码示例,展示了Aspect.all()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Aspect.all()
方法的具体详情如下:
包路径:com.artemis.Aspect
类名称:Aspect
方法名:all
[英]Returns an aspect that matches all entities.
[中]返回与所有实体匹配的方面。
代码示例来源:origin: junkdog/artemis-odb
/**
* @param processSitesEvenIfNoListener
* If true, only act on fields with an attached {@link LinkListener}.
* @param fireEventsOnRegistration
* If true,
*/
public EntityLinkManager(boolean processSitesEvenIfNoListener, boolean fireEventsOnRegistration) {
super(all());
this.requireListener = !processSitesEvenIfNoListener;
this.fireEventsOnRegistration = fireEventsOnRegistration;
}
代码示例来源:origin: net.mostlyoriginal.artemis-odb/contrib-jam
/**
* Creates a new EntityProcessingSystem.
*/
@SuppressWarnings("unchecked")
public ClampedSystem() {
super(Aspect.all(Pos.class, Clamped.class));
}
代码示例来源:origin: net.onedaybeard.artemis/artemis-odb
/**
* @param processSitesEvenIfNoListener
* If true, only act on fields with an attached {@link LinkListener}.
* @param fireEventsOnRegistration
* If true,
*/
public EntityLinkManager(boolean processSitesEvenIfNoListener, boolean fireEventsOnRegistration) {
super(all());
this.requireListener = !processSitesEvenIfNoListener;
this.fireEventsOnRegistration = fireEventsOnRegistration;
}
代码示例来源:origin: DaanVanYperen/artemis-odb-contrib
public SubscriptionManager() {
super(Aspect.all());
subscriberEntities = new HashMap<>();
entitySubscribers = new Bag<>();
}
代码示例来源:origin: apotapov/gdx-artemis
/**
* Creates an filter where an entity must possess all of the specified component types.
*
* @param type a required component type
* @param types a required component type
* @return an filter that can be matched against entities
*/
public static Aspect getAspectForAll(Class<? extends Component> type, Class<? extends Component>... types) {
Aspect filter = new Aspect();
filter.all(type, types);
return filter;
}
代码示例来源:origin: junkdog/artemis-odb
public OptimizedSystemAdditional() {
super(Aspect.all());
setEnabled(true);
begin();
}
代码示例来源:origin: junkdog/artemis-odb
@Override
public void setWorld(World world) {
all = world.getAspectSubscriptionManager().get(all());
}
}
代码示例来源:origin: junkdog/artemis-odb
@Override
protected void setWorld(World world) {
super.setWorld(world);
// making sure the first subscription matches all entities
get(all());
}
代码示例来源:origin: junkdog/artemis-odb
public IntOptimizedSystemAdditional() {
super(Aspect.all());
setEnabled(true);
begin();
}
代码示例来源:origin: junkdog/artemis-odb
@Override
public void setWorld(World world) {
all = world.getAspectSubscriptionManager().get(all());
}
}
代码示例来源:origin: junkdog/artemis-odb
@Override
public void setWorld(World world) {
all = world.getAspectSubscriptionManager().get(all());
}
代码示例来源:origin: net.onedaybeard.artemis/artemis-odb
@Override
public void setWorld(World world) {
all = world.getAspectSubscriptionManager().get(all());
}
}
代码示例来源:origin: net.onedaybeard.artemis/artemis-odb
@Override
public void setWorld(World world) {
all = world.getAspectSubscriptionManager().get(all());
}
}
代码示例来源:origin: junkdog/artemis-odb
@Override
public void setWorld(World world) {
all = world.getAspectSubscriptionManager().get(all());
}
代码示例来源:origin: yichen0831/Bomberman_libGdx
public PlayerSystem() {
super(Aspect.all(Player.class, Transform.class, Renderer.class, RigidBody.class, State.class));
fromV = new Vector2();
toV = new Vector2();
}
代码示例来源:origin: junkdog/artemis-odb
@Override
protected void initialize() {
world.getAspectSubscriptionManager().get(all())
.addSubscriptionListener(new EntitySubscription.SubscriptionListener() {
@Override
public void inserted(IntBag entities) {
}
@Override
public void removed(IntBag entities) {
deleted(entities);
}
});
}
代码示例来源:origin: junkdog/artemis-odb
/**
* 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());
}
代码示例来源:origin: junkdog/artemis-odb
private Aspect.Builder toAspect(All all, One one, Exclude exclude) {
return all(all != null ? all.value() : EMPTY_COMPONENT_CLASS_ARRAY)
.one(one != null ? one.value() : EMPTY_COMPONENT_CLASS_ARRAY)
.exclude(exclude != null ? exclude.value() : EMPTY_COMPONENT_CLASS_ARRAY);
}
代码示例来源:origin: junkdog/artemis-odb
private Aspect.Builder toAspect(AspectDescriptor ad) {
return all(ad.all()).one(ad.one()).exclude(ad.exclude());
}
代码示例来源:origin: net.onedaybeard.artemis/artemis-odb
private Aspect.Builder toAspect(All all, One one, Exclude exclude) {
return all(all != null ? all.value() : EMPTY_COMPONENT_CLASS_ARRAY)
.one(one != null ? one.value() : EMPTY_COMPONENT_CLASS_ARRAY)
.exclude(exclude != null ? exclude.value() : EMPTY_COMPONENT_CLASS_ARRAY);
}
内容来源于网络,如有侵权,请联系作者删除!