Added testing and save/load mechanic to the game. Game is now entering final phase.
This commit is contained in:
@@ -107,6 +107,19 @@ public partial class UIHandler : Control
|
||||
GetTree().ChangeSceneToFile("res://Scenes/MainMenu.tscn");
|
||||
}
|
||||
|
||||
public void SaveGame()
|
||||
{
|
||||
SaveGameManager.SaveGame();
|
||||
}
|
||||
|
||||
public void LoadGame()
|
||||
{
|
||||
if (!SaveGameManager.SaveExists()) return;
|
||||
|
||||
GameData.loadSaveOnStart = true;
|
||||
GetTree().ChangeSceneToFile("res://Scenes/Game.tscn");
|
||||
}
|
||||
|
||||
public void OpenUIElement(Control element)
|
||||
{
|
||||
if (element.Visible)
|
||||
|
||||
Reference in New Issue
Block a user