Ejemplo n.º 1
0
  public static void main(String[] args) {
    Engine engine = new Engine();

    engine.addSystem(new SystemA(10));
    engine.addSystem(new SystemB(5));
    engine.addSystem(new SystemA(2));

    engine.update(0);
  }
Ejemplo n.º 2
0
 @Override
 public void addedToEngine(Engine engine) {
   super.addedToEngine(engine);
   worldEntities =
       engine.getEntitiesFor(
           Family.getFamilyFor(TextureComponent.class, TransformComponent.class));
   particleEntities = engine.getEntitiesFor(Family.getFamilyFor(ParticleComponent.class));
   mapEntities = engine.getEntitiesFor(Family.getFamilyFor(MapComponent.class));
   spineAnimatedEntities = engine.getEntitiesFor(Family.getFamilyFor(SpineComponent.class));
 }