You spin me right 'round, baby, right 'round
This commit is contained in:
@@ -25,11 +25,13 @@ public class DDDView extends GameAdaptator {
|
|||||||
private final Window window;
|
private final Window window;
|
||||||
private final World world;
|
private final World world;
|
||||||
private BoardEntity boardEntity;
|
private BoardEntity boardEntity;
|
||||||
|
private final Camera camera;
|
||||||
|
|
||||||
public DDDView(CommandExecutor commandExecutor) {
|
public DDDView(CommandExecutor commandExecutor) {
|
||||||
this.commandExecutor = commandExecutor;
|
this.commandExecutor = commandExecutor;
|
||||||
this.world = new World();
|
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
|
// Invoked when a cell is clicked
|
||||||
@@ -106,11 +108,10 @@ public class DDDView extends GameAdaptator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
// this.window.addRegularTask((delta) -> {
|
this.window.addRegularTask((delta) -> {
|
||||||
// final float angle = 1f;
|
final float angle = 1f;
|
||||||
// final Camera cam = this.world.getCamera();
|
this.camera.setRotateAngle(this.camera.getRotateAngle() + angle * delta);
|
||||||
// cam.setRotateAngle(cam.getRotateAngle() + angle * delta);
|
});
|
||||||
// });
|
|
||||||
this.window.run();
|
this.window.run();
|
||||||
|
|
||||||
// free OpenGL resources
|
// free OpenGL resources
|
||||||
|
|||||||
Reference in New Issue
Block a user