Add attribute system with core stats and gameplay components
This commit is contained in:
15
GameCore/Combat/DamageEventComponent.cs
Normal file
15
GameCore/Combat/DamageEventComponent.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using GameCore.ECS;
|
||||
using GameCore.ECS.Interfaces;
|
||||
|
||||
namespace GameCore.Combat;
|
||||
|
||||
/// <summary>
|
||||
/// A temporary, event-like component. When this component is added to an entity,
|
||||
/// the DamageSystem will process it, apply damage to the target, and then
|
||||
/// immediately remove this component. This simulates a one-time damage event.
|
||||
/// </summary>
|
||||
public class DamageEventComponent(Entity target, float amount) : IComponent
|
||||
{
|
||||
public Entity Target { get; set; } = target;
|
||||
public float Amount { get; set; } = amount;
|
||||
}
|
||||
Reference in New Issue
Block a user