This commit is contained in:
redglow
2026-07-21 20:49:24 +02:00
parent c540b99eb6
commit e7dbb9cabb
31 changed files with 394 additions and 76 deletions
+20
View File
@@ -0,0 +1,20 @@
using GodotHostTest.Helpers;
using GodotHostTest.Interfaces;
using R3;
namespace GodotHostTest.Game.Target;
public class TargetEventBus : ITargetEventBus
{
private readonly Pipe<Unit> _hitOutPipe = new();
private readonly Pipe<Unit> _timedOutPipe = new();
public Observable<Unit> TimedOut => _timedOutPipe.Observable;
public Observable<Unit> Hit => _hitOutPipe.Observable;
public void NewTargetSpawner(ITargetSpawner targetSpawner)
{
_timedOutPipe.PipeIn(targetSpawner.TargetSpawned.SelectMany(target => target.TimedOut));
_hitOutPipe.PipeIn(targetSpawner.TargetSpawned.SelectMany(target => target.Hit));
}
}