mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-03 16:55:54 +00:00
Game state manager and restored inventory
This commit is contained in:
parent
f0f49f8fb4
commit
a0ec2f3d74
27 changed files with 1283 additions and 1175 deletions
|
|
@ -3,6 +3,7 @@ using System;
|
|||
using Cirno.Scripts;
|
||||
using Cirno.Scripts.Resources;
|
||||
using Cirno.Scripts.Resources.DebugMenu;
|
||||
using Cirno.Scripts.Utils;
|
||||
using Godot.Collections;
|
||||
using DebugMapSelectData = Cirno.Scripts.Resources.DebugMenu.DebugMapSelectData;
|
||||
|
||||
|
|
@ -26,9 +27,9 @@ public partial class DebugMenu : MenuBase
|
|||
// Called when the node enters the scene tree for the first time.
|
||||
public override void _Ready()
|
||||
{
|
||||
if (GameManager.Instance is not null)
|
||||
if (GameStateManager.Instance is not null)
|
||||
{
|
||||
GameManager.Instance.GameStateChange += OnGameStateChange;
|
||||
GameStateManager.Instance.GameStateChange += OnGameStateChange;
|
||||
}
|
||||
|
||||
DefaultSelectedButton.GrabFocus();
|
||||
|
|
@ -63,7 +64,7 @@ public partial class DebugMenu : MenuBase
|
|||
{
|
||||
if (state is not GameState.Paused)
|
||||
{
|
||||
GameManager.Instance.GameStateChange -= OnGameStateChange;
|
||||
GameStateManager.Instance.GameStateChange -= OnGameStateChange;
|
||||
CloseMenu();
|
||||
}
|
||||
|
||||
|
|
@ -91,9 +92,9 @@ public partial class DebugMenu : MenuBase
|
|||
|
||||
private void ButtonOnPressed(DebugMapSelectResource scene)
|
||||
{
|
||||
if (GameManager.Instance is not null)
|
||||
if (GameStateManager.Instance is not null)
|
||||
{
|
||||
GameManager.Instance.Unpause();
|
||||
GameStateManager.Instance.Unpause();
|
||||
}
|
||||
GlobalState.Instance.GoToScene(scene.ScenePath, scene.StartData);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue