Files
godot-host-test/Game/GameRootScope.cs
T
2026-07-11 10:54:02 +02:00

18 lines
497 B
C#

using Godot;
using GodotHostTest.GodotDI;
using GodotHostTest.Interfaces;
using Microsoft.Extensions.DependencyInjection;
namespace GodotHostTest.Game;
public partial class GameRootScope : RootScope
{
[Export] private TargetSpawner _targetSpawner = null!;
protected override void Configure(IServiceCollection serviceCollection)
{
serviceCollection
.AddSingleton<ITargetCollector>(_targetSpawner)
.AddSingleton<ITargetSpawner>(_targetSpawner);
}
}