implement save and load settings
This commit is contained in:
@@ -13,6 +13,7 @@ window.Minecraft = class {
|
||||
this.timer = new Timer(20);
|
||||
|
||||
this.settings = new GameSettings();
|
||||
this.settings.load();
|
||||
|
||||
// Create window and world renderer
|
||||
this.window = new GameWindow(this, canvasWrapperId);
|
||||
@@ -139,6 +140,11 @@ window.Minecraft = class {
|
||||
return;
|
||||
}
|
||||
|
||||
// Close previous screen
|
||||
if (!(this.currentScreen === null)) {
|
||||
this.currentScreen.onClose();
|
||||
}
|
||||
|
||||
// Switch screen
|
||||
this.currentScreen = screen;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user