Search in sources :

Example 1 with BodyBuilder

use of com.ilargia.games.entitas.egdx.base.util.BodyBuilder in project Entitas-Java by Rubentxu.

the class MatchOneState method initialize.

@Override
public void initialize() {
    entitas = new Entitas();
    EntityIndexExtension.addEntityIndices(entitas);
    // Input
    World physics = engine.getManager(BasePhysicsManager.class).getPhysics();
    BodyBuilder bodyBuilder = engine.getManager(BasePhysicsManager.class).getBodyBuilder();
    Camera camera = engine.getManager(BaseSceneManager.class).getDefaultCamera();
    Batch batch = engine.getManager(BaseSceneManager.class).getBatch();
    EmitInputSystem emitInputSystem = new EmitInputSystem(entitas.input, physics, camera);
    systems.add(new ProcessInputSystem(entitas)).add(new GameBoardSystem(entitas.game)).add(new FallSystem(entitas.game)).add(new FillSystem(entitas.game)).add(new ScoreSystem(entitas)).add(new RemoveViewSystem(entitas.game, physics)).add(new AddViewSystem(entitas.game, assetsManager, bodyBuilder)).add(new AnimatePositionSystem(entitas.game)).add(new DestroySystem(entitas.game)).add(new RendererSystem(entitas, camera, batch, physics));
}
Also used : BaseSceneManager(com.ilargia.games.entitas.egdx.base.managers.BaseSceneManager) World(com.badlogic.gdx.physics.box2d.World) BodyBuilder(com.ilargia.games.entitas.egdx.base.util.BodyBuilder) Batch(com.badlogic.gdx.graphics.g2d.Batch) BasePhysicsManager(com.ilargia.games.entitas.egdx.base.managers.BasePhysicsManager) Camera(com.badlogic.gdx.graphics.Camera) Entitas(com.ilargia.games.entitas.core.Entitas)

Aggregations

Camera (com.badlogic.gdx.graphics.Camera)1 Batch (com.badlogic.gdx.graphics.g2d.Batch)1 World (com.badlogic.gdx.physics.box2d.World)1 Entitas (com.ilargia.games.entitas.core.Entitas)1 BasePhysicsManager (com.ilargia.games.entitas.egdx.base.managers.BasePhysicsManager)1 BaseSceneManager (com.ilargia.games.entitas.egdx.base.managers.BaseSceneManager)1 BodyBuilder (com.ilargia.games.entitas.egdx.base.util.BodyBuilder)1