Show / Hide Table of Contents

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.

Inheritance
object
EffectTriggerBase<TEffect>
AdvancedEffectTrigger<TTriggerArgs>
EffectTrigger
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 class EffectTriggerBase<TEffect> where TEffect : EffectBase
Type Parameters
Name Description
TEffect

Constructors

View Source

EffectTriggerBase()

Constructor.

Declaration
protected EffectTriggerBase()

Fields

View Source

EffectsList

All effects that are part of this trigger.

Declaration
protected readonly List<TEffect> EffectsList
Field Value
Type Description
List<TEffect>

Properties

View Source

Effects

List of all effects that are part of this trigger.

Declaration
public IReadOnlyList<TEffect> Effects { get; }
Property Value
Type Description
IReadOnlyList<TEffect>

Methods

View Source

Add(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.

View Source

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.

View Source

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

View Source

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.

View Source

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.

Overrides
object.ToString()

Extension Methods

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