18 lines
513 B
C#
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);
|
|
}
|
|
} |