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,12 +1,10 @@
using Godot;
using GodotHostTest.AetherBind;
using GodotHostTest.Interfaces;
using OwofGames.AetherBind;
using R3;
namespace GodotHostTest.Game.Target;
[Injected]
public partial class Target : Node2D, ITarget
{
private readonly Subject<Unit> _hit = new();
@@ -17,7 +15,7 @@ public partial class Target : Node2D, ITarget
[Export] public double TimeOutDurationInSeconds;
[Export] public required Timer TimeOutTimer;
[Inject] private IValueGetter<ITargetCollector> _targetCollector = null!;
[Inject] private ITargetCollector _targetCollector = null!;
public Observable<Unit> TimedOut => _timedOut.AsObservable();
@@ -32,7 +30,7 @@ public partial class Target : Node2D, ITarget
public override void _Ready()
{
_targetCollector.Value.NewTarget(this);
_targetCollector.NewTarget(this);
}
public override void _ExitTree()