Files
AceField-New-Horizon/Scripts/Root.cs
2025-08-31 01:44:18 +08:00

28 lines
1.1 KiB
C#

using Godot;
using AceFieldNewHorizon.Scripts.System;
using SimpleInjector;
namespace AceFieldNewHorizon.Scripts;
public partial class Root : Node
{
public override void _Ready()
{
// Dependency Injection container is now initialized via AutoLoad (DIInitializer.cs).
// Get references to the main system nodes from the scene tree
// and inject their dependencies.
// This assumes these nodes are direct children or easily accessible.
// You might need to adjust paths based on your scene setup.
// Example:
// var resourceManager = GetNode<ResourceManager>("ResourceSystem"); // Assuming ResourceManager is a child of Root
// DependencyInjection.Container.InjectProperties(resourceManager); // If ResourceManager had properties to inject
// For now, we'll manually resolve and assign for the main system nodes.
// The actual injection will happen in the _Ready methods of the system nodes themselves,
// by resolving from the static container.
// This is a common pattern when Godot instantiates the nodes.
}
}