Class EffectTarget<TTarget>
- Namespace
- AshesOfVelsingrad.Systems
- Assembly
- Ashes of Velsingrad.dll
Base class for any entity that can receive and manage StatusEffect<TTarget>s. Provides default implementations for applying, removing, and querying effects.
public class EffectTarget<TTarget> : IEffectTarget<TTarget>
Type Parameters
TTargetThe type of target this effect system is applied to (e.g., UnitSystem, CellInformation).
- Inheritance
-
EffectTarget<TTarget>
- Implements
-
IEffectTarget<TTarget>
- Derived
- Inherited Members
Methods
ApplyEffect(StatusEffect<TTarget>)
Applies a status effect to this target.
public virtual void ApplyEffect(StatusEffect<TTarget> statusEffect)
Parameters
statusEffectStatusEffect<TTarget>The StatusEffect<TTarget> instance to apply.
GetActiveEffects()
Retrieves all status effects currently active on this target.
public List<StatusEffect<TTarget>> GetActiveEffects()
Returns
- List<StatusEffect<TTarget>>
A list of StatusEffect<TTarget> representing all active effects.
HasEffect<T>()
Checks whether this target currently has an active status effect of the specified type.
public bool HasEffect<T>() where T : StatusEffect<TTarget>
Returns
- bool
trueif the effect is present on this target; otherwise,false.
Type Parameters
TThe type of StatusEffect<TTarget> to check for.
RemoveEffect(StatusEffect<TTarget>)
Removes a status effect from this target.
public virtual void RemoveEffect(StatusEffect<TTarget> statusEffect)
Parameters
statusEffectStatusEffect<TTarget>The StatusEffect<TTarget> instance to remove.