feat: working version with scopes.

This commit is contained in:
redglow
2026-07-18 12:09:43 +02:00
parent 23e160438f
commit 04f0b5ef16
15 changed files with 120 additions and 87 deletions
+2 -2
View File
@@ -10,12 +10,12 @@ namespace GodotHostTest.Game;
public partial class Projectile : Node2D
{
[Inject] private readonly ILogger<Projectile> _logger = null!;
[Inject] private readonly ITargetSpawner _targetSpawner = null!;
[Inject] private readonly IValueGetter<ITargetSpawner> _targetSpawner = null!;
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
_targetSpawner.TargetSpawned
_targetSpawner.Value.TargetSpawned
.Subscribe(_ => _logger.LogInformation("Projectile got informed of target spawning")).AddTo(this);
}
}