feat: cleanups and API updates
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using Godot;
|
||||
using GodotHostTest.Game.Level;
|
||||
using GodotHostTest.Game.Score;
|
||||
using GodotHostTest.Game.Target;
|
||||
using GodotHostTest.Interfaces;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using OwofGames.GodotHost.Observability;
|
||||
using OwofGames.GodotLume;
|
||||
using RootServiceSource = GodotHostTest.AetherBind.RootServiceSource;
|
||||
|
||||
namespace GodotHostTest.Game.Game;
|
||||
|
||||
public partial class GameServiceSource : RootServiceSource
|
||||
{
|
||||
[Export] private LevelsData _levelsData = null!;
|
||||
|
||||
protected override void Configure(Builder builder)
|
||||
{
|
||||
builder
|
||||
.AddSingleton<ITargetEventBus, TargetEventBus>()
|
||||
.AddSingleton<IScore, TotalScore>()
|
||||
.AddLevelServices(_levelsData);
|
||||
}
|
||||
|
||||
protected override void ConfigureServices(IServiceCollection serviceCollection)
|
||||
{
|
||||
serviceCollection.AddObservability(builder => builder.AddGrpcExporter("http://localhost:4317"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user