Files
godot-host-test/Game/GameRootServiceSource.cs
T
2026-07-17 09:59:07 +02:00

18 lines
513 B
C#

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