Interface IBarrierContainer
- Namespace
- ElectricDrill.AstraHealth.Barrier
- Assembly
- com.electricdrill.astra-health.Runtime.dll
Contract for entities that hold a barrier (temporary hit points) that absorbs incoming damage before health.
Implement this interface on any component that manages a barrier pool so that pipeline steps
and external packages can interact with the barrier without depending on EntityHealth directly.
EntityHealth implements this interface. Future packages (e.g. modifier steps that
grant barrier on-hit) should accept IBarrierContainer rather than the concrete type.
public interface IBarrierContainer
Properties
Barrier
Current barrier points. Zero means no barrier is active.
long Barrier { get; }
Property Value
- long
Methods
AddBarrier(long)
Adds the specified amount to the entity's barrier pool.
void AddBarrier(long amount)
Parameters
amountlongPositive amount to add.
RemoveBarrier(long)
Removes the specified amount from the entity's barrier pool, flooring at zero.
void RemoveBarrier(long amount)
Parameters
amountlongPositive amount to consume.