mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 10:35:34 +00:00
Game saving and loading
This commit is contained in:
parent
fbd00dcd15
commit
73b0847948
9 changed files with 83 additions and 26 deletions
|
|
@ -50,11 +50,19 @@ public partial class MainMenu : CanvasLayer
|
|||
|
||||
private void _on_start_button_pressed()
|
||||
{
|
||||
if (GameScene != null)
|
||||
if (GameScene == null) return;
|
||||
GlobalState.Session.NewSession();
|
||||
GlobalState.Session.AllowSaving = true;
|
||||
GlobalState.Instance.GotoScene(GameScene);
|
||||
//GetTree().ChangeSceneToFile(GameScene);
|
||||
}
|
||||
|
||||
private void OnContinuePressed()
|
||||
{
|
||||
if (GameScene == null) return;
|
||||
if (GlobalState.Instance.LoadGame())
|
||||
{
|
||||
GlobalState.Session.NewSession();
|
||||
GlobalState.Instance.GotoScene(GameScene);
|
||||
//GetTree().ChangeSceneToFile(GameScene);
|
||||
GlobalState.Session.AllowSaving = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue