Class EffectTriggerBase<TEffect>
Base class for EffectTrigger and AdvancedEffectTrigger<TTriggerArgs>. Typically not useful unless you're creating a a custom implementation of effects and/or triggers.
Inherited Members
Namespace: GoRogue.Effects
Assembly: GoRogue.dll
Syntax
public class EffectTriggerBase<TEffect> where TEffect : EffectBase
Type Parameters
Name | Description |
---|---|
TEffect |
Constructors
View SourceEffectTriggerBase()
Constructor.
Declaration
protected EffectTriggerBase()
Fields
View SourceEffectsList
All effects that are part of this trigger.
Declaration
protected readonly List<TEffect> EffectsList
Field Value
Type | Description |
---|---|
List<TEffect> |
Properties
View SourceEffects
List of all effects that are part of this trigger.
Declaration
public IReadOnlyList<TEffect> Effects { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<TEffect> |
Methods
View SourceAdd(TEffect)
Adds the given effect to this trigger, provided the effect's duration is not 0. If the effect's duration is 0, an ArgumentException is thrown.
Declaration
public virtual void Add(TEffect effect)
Parameters
Type | Name | Description |
---|---|---|
TEffect | effect | The effect to add to this trigger. |
AddRange(IEnumerable<TEffect>)
Adds the given effects to this trigger, provided the effect's durations are not 0. If an effect's duration is 0, an ArgumentException is thrown.
Declaration
public virtual void AddRange(IEnumerable<TEffect> effects)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<TEffect> | effects | The effects to add to this trigger. |
Remove(TEffect)
Removes the given effect from this trigger.
Declaration
public virtual void Remove(TEffect effect)
Parameters
Type | Name | Description |
---|---|---|
TEffect | effect | The effect to remove |
RemoveAll(Predicate<TEffect>)
Removes all given effects from this trigger which match the predicate.
Declaration
public void RemoveAll(Predicate<TEffect> match)
Parameters
Type | Name | Description |
---|---|---|
Predicate<TEffect> | match | The predicate to decide which effects to remove. |
ToString()
Yields a string representation of each effect that has been added to the effect trigger.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string representation of each effect that has been added to the effect trigger. |