From 558af8c25aee52aad4edeaa998511a77704c2c97 Mon Sep 17 00:00:00 2001 From: pacien Date: Thu, 1 Feb 2018 16:04:39 +0100 Subject: Dedup Signed-off-by: pacien --- .../java/fr/umlv/java/wallj/controller/StagePhysicsController.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/fr/umlv/java/wallj/controller/StagePhysicsController.java b/src/main/java/fr/umlv/java/wallj/controller/StagePhysicsController.java index 0846584..6719302 100644 --- a/src/main/java/fr/umlv/java/wallj/controller/StagePhysicsController.java +++ b/src/main/java/fr/umlv/java/wallj/controller/StagePhysicsController.java @@ -17,17 +17,15 @@ public class StagePhysicsController implements Controller { private static final int POSITION_TICK_PER_MS = 2; private final Stage stage; - private final World world; public StagePhysicsController(Stage stage) { this.stage = Objects.requireNonNull(stage); - this.world = new World(new Vec2()); } @Override public List update(Context context) { int dt = (int) context.getTimeDelta().toMillis(); - world.step(dt, dt * VELOCITY_TICK_PER_MS, dt * POSITION_TICK_PER_MS); + stage.getWorld().step(dt, dt * VELOCITY_TICK_PER_MS, dt * POSITION_TICK_PER_MS); return null; } -- cgit v1.2.3