CellEffectBase Class
Definition
Section titled “Definition”A base class for cell effects.
[DataContract]public abstract class CellEffectBase : ICellEffectInheritance object
Implements ICellEffect
Constructors
Section titled “Constructors”CellEffectBase()
Section titled “CellEffectBase()”Creates a new instance of the effect.
protected CellEffectBase()Fields
Section titled “Fields”_delayFinished
Section titled “_delayFinished”A flag to indidcate that the delay timer has finished.
[DataMember]protected bool _delayFinished_timeElapsed
Section titled “_timeElapsed”The total time elapsed while processing the effect.
[DataMember]protected TimeSpan _timeElapsedProperties
Section titled “Properties”IsFinished
Section titled “IsFinished”True when the effect is finished.
[DataMember]public bool IsFinished { get; protected set; }CloneOnAdd
Section titled “CloneOnAdd”Flags this effect to be cloned when assigned to a cell instead of reused.
[DataMember]public bool CloneOnAdd { get; set; }StartDelay
Section titled “StartDelay”A delay applied to the effect only when it first runs or is restarted.
[DataMember]public TimeSpan StartDelay { get; set; }RemoveOnFinished
Section titled “RemoveOnFinished”When true, the effect should be disassociated with cells when it has finished processing.
[DataMember]public bool RemoveOnFinished { get; set; }RestoreCellOnRemoved
Section titled “RestoreCellOnRemoved”When true, indicates the EffectsManager should restore the cell to its original state.
[DataMember]public bool RestoreCellOnRemoved { get; set; }RunEffectOnApply
Section titled “RunEffectOnApply”When true, indicates that the EffectsManager should run one update frame on this effect when it’s first added to the manager.
[DataMember]public bool RunEffectOnApply { get; set; }Methods
Section titled “Methods”ApplyToCell(ColoredGlyphBase, ColoredGlyphBase)
Section titled “ApplyToCell(ColoredGlyphBase, ColoredGlyphBase)”Applies the state of the effect to a cell.
public abstract bool ApplyToCell(ColoredGlyphBase cell, ColoredGlyphBase originalState)Parameters
Section titled “Parameters”cell ColoredGlyphBase
The surface cell using this effect.
originalState ColoredGlyphBase
The state of the cell prior to the effect being applied.
Returns
Section titled “Returns”bool
true when this method modified the cell; otherwise false.
Update(TimeSpan)
Section titled “Update(TimeSpan)”Updates the state of the effect.
public virtual void Update(TimeSpan delta)Parameters
Section titled “Parameters”delta TimeSpan
Time since the last call to this effect.
Restart()
Section titled “Restart()”Restarts the cell effect.
public virtual void Restart()Clone()
Section titled “Clone()”Returns a duplicate of this effect.
public abstract ICellEffect Clone()Returns
Section titled “Returns”ICellEffect
A new copy of this effect.