Class EffectBase
Base class for Effect and AdvancedEffect<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 abstract class EffectBase
Constructors
View SourceEffectBase(string, int)
Constructor.
Declaration
protected EffectBase(string name, int startingDuration)
Parameters
Type | Name | Description |
---|---|---|
string | name | Name for the effect. |
int | startingDuration | Starting duration for the effect. |
Properties
View SourceDuration
The duration of the effect.
Declaration
public int Duration { get; set; }
Property Value
Type | Description |
---|---|
int |
Remarks
When the duration reaches 0, the effect will be automatically removed from an EffectTrigger. The duration can be changed from a subclass, which can be used in OnTrigger to cause an effect to be "cancelled", eg. immediately expire, or to extend/reduce its duration.
Name
The name of the effect.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
View SourceToString()
Returns a string of the effect's name and duration.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | String representation of the effect. |
Overrides
Events
View SourceExpired
Event that fires as soon as the effect is about to expire. Fires after the OnTrigger function has been called but before it is removed from any EffectTrigger instances.
Declaration
public event EventHandler? Expired
Event Type
Type | Description |
---|---|
EventHandler |