Show / Hide Table of Contents

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.

Inheritance
object
EffectBase
AdvancedEffect<TTriggerArgs>
Effect
Inherited Members
object.GetType()
object.MemberwiseClone()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: GoRogue.Effects
Assembly: GoRogue.dll
Syntax
public abstract class EffectBase

Constructors

View Source

EffectBase(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 Source

Duration

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.

View Source

Name

The name of the effect.

Declaration
public string Name { get; set; }
Property Value
Type Description
string

Methods

View Source

ToString()

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
object.ToString()

Events

View Source

Expired

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

Extension Methods

Utility.Yield<T>(T)
  • View Source
In this article
Back to top Generated by DocFX