implement gui

This commit is contained in:
LabyStudio
2022-02-03 11:07:53 +01:00
parent 3f8d63cb7f
commit 85c62325c1
7 changed files with 95 additions and 8 deletions
+5 -1
View File
@@ -4,7 +4,7 @@ window.Minecraft = class {
* Create Minecraft instance and render it on a canvas
*/
constructor(canvasWrapperId) {
this.worldRenderer = new WorldRenderer(this);
this.worldRenderer = new WorldRenderer(this, canvasWrapperId);
this.window = new GameWindow(this, this.worldRenderer, canvasWrapperId);
this.timer = new Timer(20);
@@ -22,6 +22,10 @@ window.Minecraft = class {
this.player = new Player(this.world);
this.pickedBlock = 1;
// Create current screen and overlay
this.ingameOverlay = new IngameOverlay();
this.currentScreen = null;
// Initialize
this.init();
}