implement settings and controls screen

This commit is contained in:
LabyStudio
2022-02-05 16:58:30 +01:00
parent 52427e610d
commit e1c5ccfa89
10 changed files with 108 additions and 14 deletions
+7
View File
@@ -10,6 +10,8 @@ window.Minecraft = class {
// Tick timer
this.timer = new Timer(20);
this.settings = new GameSettings();
// Create window and world renderer
this.window = new GameWindow(this, canvasWrapperId);
@@ -125,6 +127,11 @@ window.Minecraft = class {
}
displayScreen(screen) {
if (typeof screen === "undefined") {
console.log("Tried to display an undefined screen");
return;
}
// Switch screen
this.currentScreen = screen;