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 OwofGames.AetherBind;
@@ -7,20 +6,19 @@ using R3;
namespace GodotHostTest.Game.Score;
[Injected]
public partial class Score : Control, IScore
{
[Export] private AnimationPlayer _animationPlayer = null!;
[Export] private Label _label = null!;
private int _score;
[Inject] private IValueGetter<ITargetSpawner> _targetSpawner = null!;
[Inject] private ITargetSpawner _targetSpawner = null!;
int IScore.Score => _score;
public override void _Ready()
{
_targetSpawner.Value.TargetSpawned.Subscribe(OnTargetSpawned).AddTo(this);
_targetSpawner.TargetSpawned.Subscribe(OnTargetSpawned).AddTo(this);
base._Ready();
}