AddStatusEffect
Declaration
public static StatusEffect AddStatusEffect(StatusEffectData statusEffectData)
Parameters
statusEffectData | The data that the new StatusEffect should use. |
Returns
StatusEffect Returns the StatusEffect reference that was added to the MonoBehaviour.
Description
Adds a new StatusEffect to a given MonoBehaviour.
Declaration
public static StatusEffect AddStatusEffect(StatusEffectData statusEffectData, float duration)
Parameters
statusEffectData | The data that the new StatusEffect should use. |
duration | How long in seconds the effect should last. |
Returns
StatusEffect Returns the StatusEffect reference that was added to the MonoBehaviour.
Description
Adds a new StatusEffect to a given MonoBehaviour for a duration of time.
Declaration
public static StatusEffect AddStatusEffect(StatusEffectData statusEffectData, float duration, ref Action action)
Parameters
statusEffectData | The data that the new StatusEffect should use. |
duration | How long in seconds the effect should last. |
action | A reference Action to subscribe the duration decrement to. |
Returns
StatusEffect Returns the StatusEffect reference that was added to the MonoBehaviour.
Description
Adds a new StatusEffect to a given MonoBehaviour for a duration that decrements when the referenced Action is invoked.
Declaration
public static StatusEffect AddStatusEffect(StatusEffectData statusEffectData, Func<bool> predicate)
Parameters
statusEffectData | The data that the new StatusEffect should use. |
predicate | When true will end the effect. |
Returns
StatusEffect Returns the StatusEffect reference that was added to the MonoBehaviour.
Description
Adds a new StatusEffect to a given MonoBehaviour that will be removed when the predicate is true.
Last updated