mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-07 01:55:55 +00:00
Debug menu items spawn buttons
This commit is contained in:
parent
6bf12a021f
commit
4c58436a74
9 changed files with 216 additions and 33 deletions
|
|
@ -25,6 +25,8 @@ public partial class DebugMenu : MenuBase
|
|||
// Called when the node enters the scene tree for the first time.
|
||||
public override void _Ready()
|
||||
{
|
||||
GameManager.Instance.GameStateChange += OnGameStateChange;
|
||||
|
||||
DefaultSelectedButton.GrabFocus();
|
||||
|
||||
foreach (var level in Levels.Maps)
|
||||
|
|
@ -53,6 +55,16 @@ public partial class DebugMenu : MenuBase
|
|||
|
||||
}
|
||||
|
||||
private void OnGameStateChange(GameState state)
|
||||
{
|
||||
if (state is not GameState.Paused)
|
||||
{
|
||||
GameManager.Instance.GameStateChange -= OnGameStateChange;
|
||||
CloseMenu();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void RefillHealthButtonOnPressed()
|
||||
{
|
||||
GameManager.Instance?.Player?.RefillHealth();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue