@Before
  public void init() {
    world =
        new World(
            new WorldConfiguration()
                .setSystem(new EntityFactory())
                .setSystem(new Es1())
                .setSystem(new Es2()));

    world.inject(this);
  }
  @Before
  public void init() {
    world =
        new World(
            new WorldConfiguration()
                .setSystem(new EntityFactory())
                .setSystem(new TiledMapSystem()));

    world.inject(this);

    world.process();
  }
Example #3
0
 /**
  * Inject dependencies on object.
  *
  * <p>Immediately perform dependency injection on the target.
  *
  * <p>If you want to specify nonstandard dependencies to inject, use {@link
  * com.artemis.WorldConfiguration#register(String, Object)} instead, or configure an {@link
  * com.artemis.injection.Injector}
  *
  * <p>If you want a non-throwing alternative, use {@link #inject(Object, boolean)}
  *
  * @param target Object to inject into. throws {@link MundaneWireException} if {@code target} is
  *     annotated with {@link com.artemis.annotations.SkipWire}
  * @see com.artemis.annotations.Wire for more details about dependency injection.
  * @see #inject(Object, boolean)
  */
 public void inject(Object target) {
   inject(target, true);
 }