♻️ Rebuild with DI

This commit is contained in:
2025-08-31 01:44:18 +08:00
parent 1cc941d893
commit c72353716f
13 changed files with 95 additions and 36 deletions

View File

@@ -13,7 +13,7 @@ public partial class Hud : CanvasLayer
{
_resourceDisplay = GetNode<VBoxContainer>("ResourceDisplay");
_resourceManager = GetTree().CurrentScene.GetNode<ResourceManager>("ResourceSystem");
_resourceManager = DependencyInjection.Container.GetInstance<ResourceManager>();
if (_resourceManager == null)
{
GD.PushError("ResourceSystem not found in the scene tree!");