22 lines
509 B
C#
22 lines
509 B
C#
using Cysharp.Threading.Tasks;
|
|
using YachtDice.Modifiers.Core;
|
|
using YachtDice.Modifiers.Pipeline;
|
|
|
|
namespace YachtDice.Events
|
|
{
|
|
public class GameEventBus
|
|
{
|
|
private readonly ModifierPipeline _pipeline;
|
|
|
|
public GameEventBus(ModifierPipeline pipeline)
|
|
{
|
|
this._pipeline = pipeline;
|
|
}
|
|
|
|
public UniTask<ModifierContext> Fire(TriggerType trigger, ModifierContext context)
|
|
{
|
|
return _pipeline.Execute(trigger, context);
|
|
}
|
|
}
|
|
}
|