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
+4 -3
View File
@@ -2,6 +2,7 @@ using System.Collections.Generic;
using Godot;
using GodotHostTest.Helpers;
using GodotHostTest.Interfaces;
using OwofGames.AetherBind;
using R3;
namespace GodotHostTest.Game.Target;
@@ -11,10 +12,10 @@ public partial class TargetSpawner : Node2D, ITargetCollector, ITargetSpawner
private readonly List<ITarget> _availableTargets = [];
private readonly Subject<ITarget> _targetSpawned = new();
[Export] public double TimeBetweenSpawns;
[Export] public required Timer Timer;
[Inject] private ILevel _level = null!;
public void NewTarget(ITarget target)
{
_availableTargets.Add(target);
@@ -26,7 +27,7 @@ public partial class TargetSpawner : Node2D, ITargetCollector, ITargetSpawner
public override void _Ready()
{
Spawn();
Timer.Start(TimeBetweenSpawns);
Timer.Start(_level.TimeBetweenSpawns.TotalSeconds);
}
private void MakeTargetAvailable(ITarget target)