package de.eightbitboy.ecorealms.entity;

import com.badlogic.ashley.core.Engine;
import com.badlogic.ashley.core.Entity;

public class EntityEngine {
	private Engine engine;

	public EntityEngine() {
		engine = new Engine();
		addExampleEntity();
	}

	public void update(float deltaTime) {
		engine.update(deltaTime);
	}

	private void addExampleEntity() {
		ExampleEntity entity = new ExampleEntity();
		entity.add(new PositionComponent());
		entity.add(new ModelComponent());
		engine.addEntity(entity);
	}

	private class ExampleEntity extends Entity {

	}
}

@@ -114,16 +114,56 @@
 .Entity;
+%0Aimport com.badlogic.ashley.core.Family;
 %0A%0Apublic
@@ -281,16 +281,87 @@
 tity();%0A
+%0A%0A%09%09Family positionFamily = Family.all(PositionComponent.class).get();%0A
 %09%7D%0A%0A%09pub
@@ -508,16 +508,17 @@
 tity();%0A
+%0A
 %09%09entity
@@ -544,24 +544,24 @@
 mponent());%0A
-
 %09%09entity.add
@@ -580,24 +580,25 @@
 mponent());%0A
+%0A
 %09%09engine.add

Create a family