Skip to content

EffectSet Class

Chains one effect after another.

C#
[DataContract]
public class EffectSet : CellEffectBase, ICellEffect, IEnumerable<ICellEffect>, IEnumerable

Inheritance objectCellEffectBase

Implements ICellEffect, IEnumerable<ICellEffect>, IEnumerable

C#
public EffectSet()

The list of effects to process.

C#
[DataMember]
public LinkedList<ICellEffect> Effects { get; }

When true, instead of ending when finished, it will repeat. Otherwise, false.

C#
[DataMember]
public bool Repeat { get; set; }

An artificial delay between each effect.

C#
[DataMember]
public TimeSpan DelayBetweenEffects { get; set; }

ApplyToCell(ColoredGlyphBase, ColoredGlyphBase)

Section titled “ApplyToCell(ColoredGlyphBase, ColoredGlyphBase)”

Applies the state of the effect to a cell.

C#
public override bool ApplyToCell(ColoredGlyphBase cell, ColoredGlyphBase originalState)

cell ColoredGlyphBase
The surface cell using this effect.

originalState ColoredGlyphBase
The state of the cell prior to the effect being applied.

bool
true when this method modified the cell; otherwise false.

Updates the state of the effect.

C#
public override void Update(TimeSpan delta)

delta TimeSpan
Time since the last call to this effect.

Restarts the cell effect but does not reset it.

C#
public override void Restart()

Returns a duplicate of this effect.

C#
public override ICellEffect Clone()

ICellEffect
A new copy of this effect.

C#
public override string ToString()

string

Gets an enumerator of all the effects.

C#
public IEnumerator<ICellEffect> GetEnumerator()

IEnumerator<ICellEffect>
The enumerator.

Adds an effect to the end of the Effects collection.

C#
public void Add(ICellEffect effect)

effect ICellEffect
The effect to add.