Show / Hide Table of Contents

Class CellEffectBase

A base class for cell effects.

Inheritance
object
CellEffectBase
Blink
BlinkGlyph
Blinker
CodeEffect
Delay
EffectSet
Fade
Recolor
Implements
ICellEffect
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: SadConsole.Effects
Assembly: SadConsole.dll
Syntax
[DataContract]
public abstract class CellEffectBase : ICellEffect

Constructors

CellEffectBase()

Creates a new instance of the effect.

Declaration
protected CellEffectBase()

Fields

_delayFinished

A flag to indidcate that the delay timer has finished.

Declaration
[DataMember]
protected bool _delayFinished
Field Value
Type Description
bool

_timeElapsed

The total time elapsed while processing the effect.

Declaration
[DataMember]
protected TimeSpan _timeElapsed
Field Value
Type Description
TimeSpan

Properties

CloneOnAdd

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

Declaration
[DataMember]
public bool CloneOnAdd { get; set; }
Property Value
Type Description
bool

IsFinished

True when the effect is finished.

Declaration
[DataMember]
public bool IsFinished { get; protected set; }
Property Value
Type Description
bool

RemoveOnFinished

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

Declaration
[DataMember]
public bool RemoveOnFinished { get; set; }
Property Value
Type Description
bool

RestoreCellOnRemoved

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

Declaration
[DataMember]
public bool RestoreCellOnRemoved { get; set; }
Property Value
Type Description
bool

RunEffectOnApply

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

Declaration
[DataMember]
public bool RunEffectOnApply { get; set; }
Property Value
Type Description
bool

StartDelay

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

Declaration
[DataMember]
public TimeSpan StartDelay { get; set; }
Property Value
Type Description
TimeSpan

Methods

ApplyToCell(ColoredGlyphBase, ColoredGlyphBase)

Applies the state of the effect to a cell.

Declaration
public abstract bool ApplyToCell(ColoredGlyphBase cell, ColoredGlyphBase originalState)
Parameters
Type Name Description
ColoredGlyphBase cell

The surface cell using this effect.

ColoredGlyphBase originalState

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

Returns
Type Description
bool

true when this method modified the cell; otherwise false.

Clone()

Returns a duplicate of this effect.

Declaration
public abstract ICellEffect Clone()
Returns
Type Description
ICellEffect

A new copy of this effect.

Restart()

Restarts the cell effect.

Declaration
public virtual void Restart()

Update(TimeSpan)

Updates the state of the effect.

Declaration
public virtual void Update(TimeSpan delta)
Parameters
Type Name Description
TimeSpan delta

Time since the last call to this effect.

Implements

ICellEffect

Extension Methods

ExtensionsSystem.GetDebuggerDisplayValue(object)
In this article

Back to top

Back to top Generated by DocFX