Skip to content

ICellEffect Interface

The interface describing a cell effect

C#
public interface ICellEffect

True when the effect is finished.

C#
bool IsFinished { get; }

Flags this effect to be cloned when assigned to a cell instead of reused.

C#
bool CloneOnAdd { get; set; }

A delay applied to the effect only when it first runs or is restarted.

C#
TimeSpan StartDelay { get; set; }

When true, the effect should be disassociated with cells when it has finished processing.

C#
bool RemoveOnFinished { get; set; }

When true, indicates the EffectsManager should restore the cell to its original state.

C#
bool RestoreCellOnRemoved { get; set; }

When true, indicates that the EffectsManager should run one update frame on this effect when it’s first added to the manager.

C#
bool RunEffectOnApply { get; set; }

ApplyToCell(ColoredGlyphBase, ColoredGlyphBase)

Section titled “ApplyToCell(ColoredGlyphBase, ColoredGlyphBase)”

Applies the state of the effect to a cell.

C#
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#
void Update(TimeSpan delta)

delta TimeSpan
Time since the last call to this effect.

Restarts the cell effect.

C#
void Restart()

Returns a duplicate of this effect.

C#
ICellEffect Clone()

ICellEffect
A new copy of this effect.