Add healing effects and systems with event handling
This commit is contained in:
14
GameCore/Combat/Effects/HealEffect.cs
Normal file
14
GameCore/Combat/Effects/HealEffect.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using GameCore.Combat.Interfaces;
|
||||
using GameCore.Events;
|
||||
|
||||
namespace GameCore.Combat.Effects;
|
||||
|
||||
public class HealEffect(float amount) : IEffect
|
||||
{
|
||||
public void Execute(EffectContext context)
|
||||
{
|
||||
if (context.Target == null) return;
|
||||
|
||||
context.World.PublishEvent(new HealDealtEvent(context.Target.Value, amount));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user