com.artemis.Aspect Java Examples

The following examples show how to use com.artemis.Aspect. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Fallen.java    From riiablo with Apache License 2.0 5 votes vote down vote up
@Override
public void initialize() {
  super.initialize();
  if (enemyEntities == null) {
    enemyEntities = Riiablo.engine.getAspectSubscriptionManager().get(Aspect
            .all(Class.class)
            .one(Player.class));
  }
}
 
Example #2
Source File: Zombie.java    From riiablo with Apache License 2.0 5 votes vote down vote up
@Override
public void initialize() {
  super.initialize();
  if (enemyEntities == null) {
    enemyEntities = Riiablo.engine.getAspectSubscriptionManager().get(Aspect
            .all(Class.class)
            .one(Player.class));
  }
}
 
Example #3
Source File: QuillRat.java    From riiablo with Apache License 2.0 5 votes vote down vote up
@Override
public void initialize() {
  super.initialize();
  monsound = "spikefiend";
  missile = Riiablo.files.Missiles.get(monster.monstats.MissA2);
  if (enemyEntities == null) {
    enemyEntities = Riiablo.engine.getAspectSubscriptionManager().get(Aspect
            .all(Class.class)
            .one(Player.class));
  }
}
 
Example #4
Source File: GameScreen.java    From riiablo with Apache License 2.0 5 votes vote down vote up
public void setAct(int act) {
  player = Engine.INVALID_ENTITY;
  IntBag entities = engine.getAspectSubscriptionManager().get(Aspect.all()).getEntities();
  for (int i = 0, size = entities.size(); i < size; i++) {
    engine.delete(entities.get(i));
  }

  engine.getSystem(Box2DPhysics.class).clear();

  loadingScreen.loadAct(act);
  Riiablo.client.pushScreen(loadingScreen);
}
 
Example #5
Source File: CompSystemE.java    From entity-system-benchmarks with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public CompSystemE() {
	super(Aspect.getAspectForAll(Comp10.class, Comp11.class, Comp12.class).exclude(Comp9.class));
}
 
Example #6
Source File: RemovalSystem.java    From ashley with Apache License 2.0 4 votes vote down vote up
public RemovalSystem () {
	super(Aspect.getAspectForAll(RemovalComponent.class));
}
 
Example #7
Source File: CompSystemB.java    From entity-system-benchmarks with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public CompSystemB() {
	super(Aspect.getAspectForAll(Comp2.class, Comp8.class, Comp9.class));
}
 
Example #8
Source File: BaselinePositionSystem3.java    From entity-system-benchmarks with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public BaselinePositionSystem3() {
	super(Aspect.getAspectForAll(PlainPosition.class));
}
 
Example #9
Source File: PlainPositionSystem.java    From entity-system-benchmarks with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public PlainPositionSystem() {
	super(Aspect.getAspectForAll(PlainPosition.class));
}
 
Example #10
Source File: CompSystemD.java    From entity-system-benchmarks with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public CompSystemD() {
	super(Aspect.getAspectForAll(Comp6.class, Comp7.class, Comp8.class).exclude(Comp9.class));
}
 
Example #11
Source File: BaselinePositionSystem3.java    From entity-system-benchmarks with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public BaselinePositionSystem3() {
	super(Aspect.getAspectForAll(PlainPosition.class));
}
 
Example #12
Source File: CompSystemE.java    From entity-system-benchmarks with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public CompSystemE() {
	super(Aspect.getAspectForAll(Comp10.class, Comp11.class, Comp12.class).exclude(Comp9.class));
}
 
Example #13
Source File: PooledPositionSystem2.java    From entity-system-benchmarks with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public PooledPositionSystem2() {
	super(Aspect.getAspectForAll(PooledPosition.class));
}
 
Example #14
Source File: PackedPositionSystem3.java    From entity-system-benchmarks with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public PackedPositionSystem3() {
	super(Aspect.getAspectForAll(PackedPosition.class));
}
 
Example #15
Source File: CompSystemB.java    From entity-system-benchmarks with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public CompSystemB() {
	super(Aspect.getAspectForAll(Comp2.class, Comp8.class, Comp9.class));
}
 
Example #16
Source File: CollisionSystem.java    From ashley with Apache License 2.0 4 votes vote down vote up
public CollisionSystem () {
	super(Aspect.getAspectForAll(PositionComponent.class, RadiusComponent.class));
}
 
Example #17
Source File: BaselinePositionSystem3.java    From entity-system-benchmarks with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public BaselinePositionSystem3() {
	super(Aspect.all(PlainPosition.class));
}
 
Example #18
Source File: BaselinePositionSystem.java    From entity-system-benchmarks with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public BaselinePositionSystem() {
	super(Aspect.getAspectForAll(PlainPosition.class));
}
 
Example #19
Source File: CompSystemA.java    From entity-system-benchmarks with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public CompSystemA() {
	super(Aspect.getAspectForAll(Comp1.class, Comp4.class, Comp5.class));
}
 
Example #20
Source File: PlainPositionSystem2.java    From entity-system-benchmarks with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public PlainPositionSystem2() {
	super(Aspect.getAspectForAll(PlainPosition.class));
}
 
Example #21
Source File: PlainPositionSystem3.java    From entity-system-benchmarks with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public PlainPositionSystem3() {
	super(Aspect.getAspectForAll(PlainPosition.class));
}
 
Example #22
Source File: BaselinePositionSystem2.java    From entity-system-benchmarks with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public BaselinePositionSystem2() {
	super(Aspect.getAspectForAll(PlainPosition.class));
}
 
Example #23
Source File: CompSystemC.java    From entity-system-benchmarks with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public CompSystemC() {
	super(Aspect.getAspectForAll(Comp1.class, Comp7.class, Comp9.class).exclude(Comp2.class));
}
 
Example #24
Source File: CompSystemD.java    From entity-system-benchmarks with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public CompSystemD() {
	super(Aspect.getAspectForAll(Comp6.class, Comp7.class, Comp8.class).exclude(Comp9.class));
}
 
Example #25
Source File: PlainPositionSystem.java    From entity-system-benchmarks with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public PlainPositionSystem() {
	super(Aspect.getAspectForAll(PlainPosition.class));
}
 
Example #26
Source File: BaselinePositionSystem3.java    From entity-system-benchmarks with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public BaselinePositionSystem3() {
	super(Aspect.all(PlainPosition.class));
}
 
Example #27
Source File: CompSystemB.java    From entity-system-benchmarks with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public CompSystemB() {
	super(Aspect.all(Comp2.class, Comp8.class, Comp9.class));
}
 
Example #28
Source File: PooledPositionSystem2.java    From entity-system-benchmarks with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public PooledPositionSystem2() {
	super(Aspect.all(PooledPosition.class));
}
 
Example #29
Source File: CompSystemE.java    From entity-system-benchmarks with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public CompSystemE() {
	super(Aspect.all(Comp10.class, Comp11.class, Comp12.class).exclude(Comp9.class));
}
 
Example #30
Source File: StateSystem.java    From ashley with Apache License 2.0 4 votes vote down vote up
public StateSystem () {
	super(Aspect.getAspectForAll(StateComponent.class));
}