dev #12
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user