feat: more plugin work and intra-scope communication
This commit is contained in:
@@ -1,18 +1,16 @@
|
||||
using Godot;
|
||||
using GodotHostTest.GodotDI;
|
||||
using GodotHostTest.Interfaces;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace GodotHostTest.Game;
|
||||
|
||||
public partial class LevelServiceSource : RootServiceSource
|
||||
public partial class LevelServiceSource : ServiceSource
|
||||
{
|
||||
[Export] private TargetSpawner _targetSpawner = null!;
|
||||
|
||||
protected override void Configure(IServiceCollection serviceCollection)
|
||||
{
|
||||
serviceCollection
|
||||
.AddSingleton<ITargetCollector>(_targetSpawner)
|
||||
.AddSingleton<ITargetSpawner>(_targetSpawner);
|
||||
}
|
||||
// protected override void ConfigureServices(IServiceCollection serviceCollection)
|
||||
// {
|
||||
// serviceCollection
|
||||
// .AddSingleton<ITargetCollector>(_targetSpawner)
|
||||
// .AddSingleton<ITargetSpawner>(_targetSpawner);
|
||||
// }
|
||||
}
|
||||
Reference in New Issue
Block a user