feat: new ValueProvider improvements and source generator.

This commit is contained in:
redglow
2026-07-20 11:06:35 +02:00
parent 036e4af431
commit c540b99eb6
12 changed files with 79 additions and 37 deletions
+2 -4
View File
@@ -1,5 +1,4 @@
using Godot;
using GodotHostTest.AetherBind;
using GodotHostTest.Helpers;
using GodotHostTest.Interfaces;
using Microsoft.Extensions.Logging;
@@ -8,16 +7,15 @@ using R3;
namespace GodotHostTest.Game.Projectile;
[Injected]
public partial class Projectile : Node2D
{
[Inject] private ILogger<Projectile> _logger = null!;
[Inject] private IValueGetter<ITargetSpawner> _targetSpawner = null!;
[Inject] private ITargetSpawner _targetSpawner = null!;
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
_targetSpawner.Value.TargetSpawned
_targetSpawner.TargetSpawned
.Subscribe(_ => _logger.LogInformation("Projectile got informed of target spawning")).AddTo(this);
}
}