implement gui
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user