Interaction manager and hud

This commit is contained in:
Marco 2025-06-12 18:03:55 +02:00
commit 5271b84923
20 changed files with 539 additions and 29 deletions

View file

@ -54,19 +54,24 @@ public partial class InventoryMenu : TabContainer
//ItemActivated += OnItemSelected;
GameManager.Instance.GameStateChange += state =>
// TODO: Move this on the game manager/controller side
if (GameManager.Instance is not null)
{
switch (state)
GameManager.Instance.GameStateChange += state =>
{
case GameState.Inventory:
CallDeferred(MethodName.ShowInventory);
break;
default:
CallDeferred(MethodName.HideInventory);
//HideInventory();
break;
}
};
switch (state)
{
case GameState.Inventory:
CallDeferred(MethodName.ShowInventory);
break;
default:
CallDeferred(MethodName.HideInventory);
//HideInventory();
break;
}
};
}
}
private void HideInventory()