feat: working version with scopes.
This commit is contained in:
+2
-2
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user