You spin me right 'round, baby, right 'round

This commit is contained in:
2025-05-06 09:55:48 +02:00
parent ffd77d9777
commit 83d5737789

View File

@@ -25,11 +25,13 @@ public class DDDView extends GameAdaptator {
private final Window window;
private final World world;
private BoardEntity boardEntity;
private final Camera camera;
public DDDView(CommandExecutor commandExecutor) {
this.commandExecutor = commandExecutor;
this.world = new World();
this.window = new Window(new Renderer(), this.world, new Camera());
this.camera = new Camera();
this.window = new Window(new Renderer(), this.world, this.camera);
}
// Invoked when a cell is clicked
@@ -106,11 +108,10 @@ public class DDDView extends GameAdaptator {
}
public void run() {
// this.window.addRegularTask((delta) -> {
// final float angle = 1f;
// final Camera cam = this.world.getCamera();
// cam.setRotateAngle(cam.getRotateAngle() + angle * delta);
// });
this.window.addRegularTask((delta) -> {
final float angle = 1f;
this.camera.setRotateAngle(this.camera.getRotateAngle() + angle * delta);
});
this.window.run();
// free OpenGL resources