Class AdvancedEffectTrigger<TTriggerArgs>
More advanced version of EffectTrigger which allows for a parameter to be passed to the TriggerEffects method.
Inherited Members
Namespace: GoRogue.Effects
Assembly: GoRogue.dll
Syntax
public class AdvancedEffectTrigger<TTriggerArgs> : EffectTriggerBase<AdvancedEffect<TTriggerArgs>>
Type Parameters
Name | Description |
---|---|
TTriggerArgs | The type of the parameter that will be specified to the Trigger(out bool, TTriggerArgs) function when called. |
Remarks
This effect trigger type is useful when information about a particular trigger needs to be passed to the effects in order for them to work. For example, effects which react to damage might need to know how much damage is being dealt in order to function.
Constructors
View SourceAdvancedEffectTrigger()
Declaration
public AdvancedEffectTrigger()
Methods
View SourceTriggerEffects(TTriggerArgs)
Calls the Trigger(out bool, TTriggerArgs) function of each effect in the GoRogue.Effects list (as long as its duration is not 0), then removes any effect that has duration 0.
Declaration
public void TriggerEffects(TTriggerArgs args)
Parameters
Type | Name | Description |
---|---|---|
TTriggerArgs | args | Arguments to pass to the Trigger function of each effect that is triggered. |
Remarks
If some effect sets the boolean it receives as an "out" parameter to true, the loop will be broken and no subsequent effects in the list will have Trigger called. After either this occurs or all effects have had their Trigger function called, any effect in the list that has a duration of 0 is automatically removed from the list.