Examples of addSystem()


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

        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

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

    public void entityRemovalWhileIterating(){
        Engine engine = new Engine();
        ImmutableArray<Entity> entities = engine.getEntitiesFor(Family.all(SpyComponent.class, IndexComponent.class).get());
        ComponentMapper<SpyComponent> sm = ComponentMapper.getFor(SpyComponent.class);
       
        engine.addSystem(new IteratingRemovalSystem());
       
        final int numEntities = 10;
       
        for (int i = 0; i < numEntities; ++i) {
          Entity e = new Entity();
View Full Code Here

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

    public void componentRemovalWhileIterating(){
        Engine engine = new Engine();
        ImmutableArray<Entity> entities = engine.getEntitiesFor(Family.all(SpyComponent.class, IndexComponent.class).get());
        ComponentMapper<SpyComponent> sm = ComponentMapper.getFor(SpyComponent.class);
       
        engine.addSystem(new IteratingComponentRemovalSystem());
       
        final int numEntities = 10;
       
        for (int i = 0; i < numEntities; ++i) {
          Entity e = new Entity();
View Full Code Here

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

        Engine engine = new Engine();
        IntervalIteratingSystemSpy intervalSystemSpy = new IntervalIteratingSystemSpy();
        ImmutableArray<Entity> entities = engine.getEntitiesFor(Family.all(IntervalComponentSpy.class).get());
        ComponentMapper<IntervalComponentSpy> im = ComponentMapper.getFor(IntervalComponentSpy.class);
       
        engine.addSystem(intervalSystemSpy);
       
        for (int i = 0; i < 10; ++i) {
          Entity entity = new Entity();
          entity.add(new IntervalComponentSpy());
          engine.addEntity(entity);
View Full Code Here

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

  }
 
  private static Engine prepareEngine(int numEntities) {
    Engine engine = new Engine();
   
    engine.addSystem(new MovementSystem());
    engine.addSystem(new StateSystem());
    engine.addSystem(new CollisionSystem());
    engine.addSystem(new RemovalSystem());
   
    for (int i = 0; i < numEntities; ++i) {
View Full Code Here

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

 
  private static Engine prepareEngine(int numEntities) {
    Engine engine = new Engine();
   
    engine.addSystem(new MovementSystem());
    engine.addSystem(new StateSystem());
    engine.addSystem(new CollisionSystem());
    engine.addSystem(new RemovalSystem());
   
    for (int i = 0; i < numEntities; ++i) {
      Entity entity = new Entity();
View Full Code Here

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

  private static Engine prepareEngine(int numEntities) {
    Engine engine = new Engine();
   
    engine.addSystem(new MovementSystem());
    engine.addSystem(new StateSystem());
    engine.addSystem(new CollisionSystem());
    engine.addSystem(new RemovalSystem());
   
    for (int i = 0; i < numEntities; ++i) {
      Entity entity = new Entity();
     
View Full Code Here

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

    Engine engine = new Engine();
   
    engine.addSystem(new MovementSystem());
    engine.addSystem(new StateSystem());
    engine.addSystem(new CollisionSystem());
    engine.addSystem(new RemovalSystem());
   
    for (int i = 0; i < numEntities; ++i) {
      Entity entity = new Entity();
     
      if (Constants.shouldHaveComponent(ComponentType.POSITION, i)) {
View Full Code Here

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

public class SystemPriorityTest {
  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);
  }
View Full Code Here

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

public class SystemPriorityTest {
  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);
  }
 
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.