Package com.badlogic.ashley.core

Examples of com.badlogic.ashley.core.Engine.addEntity()


        final Family family = Family.all(ComponentA.class, ComponentB.class).get();
        final IteratingSystemMock system = new IteratingSystemMock(family);
        final Entity e = new Entity();

        engine.addSystem(system);
        engine.addEntity(e);

        //When entity has ComponentA
        e.add(new ComponentA());
        engine.update(deltaTime);
View Full Code Here


          IndexComponent in = new IndexComponent();
          in.index = i + 1;
         
          e.add(in);
         
          engine.addEntity(e);
        }
       
        engine.update(deltaTime);
       
        assertEquals(numEntities / 2, entities.size());
View Full Code Here

          IndexComponent in = new IndexComponent();
          in.index = i + 1;
         
          e.add(in);
         
          engine.addEntity(e);
        }
       
        engine.update(deltaTime);
       
        assertEquals(numEntities / 2, entities.size());
View Full Code Here

        engine.addSystem(intervalSystemSpy);
       
        for (int i = 0; i < 10; ++i) {
          Entity entity = new Entity();
          entity.add(new IntervalComponentSpy());
          engine.addEntity(entity);
        }

        for (int i = 1; i <= 10; ++i) {
          engine.update(deltaTime);
         
View Full Code Here

     
      if (Constants.shouldHaveComponent(ComponentType.STATE, i)) {
        entity.add(new StateComponent());
      }
     
      engine.addEntity(entity);
    }
   
    return engine;
  }
}
View Full Code Here

    final Family family = Family.getFor(OrderComponent.class, ComponentB.class);
    final SortedIteratingSystemMock system = new SortedIteratingSystemMock(family);
    final Entity e = new Entity();

    engine.addSystem(system);
    engine.addEntity(e);
   
    //When entity has OrderComponent
    e.add(new OrderComponent("A", 0));
    engine.update(deltaTime);
View Full Code Here

      IndexComponent in = new IndexComponent();
      in.index = i + 1;
     
      e.add(in);
     
      engine.addEntity(e);
    }
   
    engine.update(deltaTime);
   
    assertEquals(numEntities / 2, entities.size());
View Full Code Here

      IndexComponent in = new IndexComponent();
      in.index = i + 1;
     
      e.add(in);
     
      engine.addEntity(e);
    }
   
    engine.update(deltaTime);
   
    assertEquals(numEntities / 2, entities.size());
View Full Code Here

    Entity a = createOrderEntity("A", 0);
    Entity b = createOrderEntity("B", 1);
    Entity c = createOrderEntity("C", 3);
    Entity d = createOrderEntity("D", 2);
   
    engine.addEntity(a);
    engine.addEntity(b);
    engine.addEntity(c);
    system.expectedNames.addLast("A");
    system.expectedNames.addLast("B");
    system.expectedNames.addLast("C");
View Full Code Here

    Entity b = createOrderEntity("B", 1);
    Entity c = createOrderEntity("C", 3);
    Entity d = createOrderEntity("D", 2);
   
    engine.addEntity(a);
    engine.addEntity(b);
    engine.addEntity(c);
    system.expectedNames.addLast("A");
    system.expectedNames.addLast("B");
    system.expectedNames.addLast("C");
    engine.update(0);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.