コード例 #1
0
ファイル: SystemPriorityTest.java プロジェクト: RCCDEV/ashley
  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);
  }
コード例 #2
0
ファイル: RenderingSystem.java プロジェクト: vladsvs/sioncore
 @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));
 }