Game state manager and restored inventory

This commit is contained in:
Marco 2025-06-25 15:36:50 +02:00
commit a0ec2f3d74
27 changed files with 1283 additions and 1175 deletions

View file

@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Linq;
using Cirno.Scripts.Utils;
using Godot;
namespace Cirno.Scripts.UI;
@ -29,7 +30,7 @@ public partial class InventoryMenu : TabContainer
{
if (Visible)
{
GameManager.Instance.ChangeState(GameState.Playing);
GameStateManager.Instance.ChangeState(GameState.Playing);
//CallDeferred(MethodName.HideInventory);
}
// else
@ -55,9 +56,9 @@ public partial class InventoryMenu : TabContainer
//ItemActivated += OnItemSelected;
// TODO: Move this on the game manager/controller side
if (GameManager.Instance is not null)
if (GameStateManager.Instance is not null)
{
GameManager.Instance.GameStateChange += state =>
GameStateManager.Instance.GameStateChange += state =>
{
switch (state)
{