29 lines
919 B
C#
29 lines
919 B
C#
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.Root;
|
|
|
|
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"));
|
|
}
|
|
} |