Difficulty Selection

This commit is contained in:
Marco 2025-04-08 15:02:41 +02:00
commit a2319b3b88
21 changed files with 188 additions and 55 deletions

View file

@ -37,6 +37,10 @@ public partial class MainMenu : CanvasLayer
[Export]
public PackedScene OptionsMenuTemplate { get; set; }
[ExportCategory("Difficulty Menu")]
[Export]
public PackedScene DifficultyMenuTemplate { get; set; }
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
@ -50,10 +54,10 @@ public partial class MainMenu : CanvasLayer
private void _on_start_button_pressed()
{
if (GameScene == null) return;
GlobalState.Session.NewSession();
GlobalState.Session.AllowSaving = true;
GlobalState.Instance.GotoScene(GameScene);
SpawnMenu<DifficultyMenu>(DifficultyMenuTemplate, SubMenuHolder);
return;
//GetTree().ChangeSceneToFile(GameScene);
}