feat: new ValueProvider improvements and source generator.
This commit is contained in:
+2
-4
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user