Interface ICellEffect
The interface describing a cell effect
Namespace: SadConsole.Effects
Assembly: SadConsole.dll
Syntax
public interface ICellEffect
Properties
CloneOnAdd
Flags this effect to be cloned when assigned to a cell instead of reused.
Declaration
bool CloneOnAdd { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsFinished
True when the effect is finished.
Declaration
bool IsFinished { get; }
Property Value
Type | Description |
---|---|
bool |
RemoveOnFinished
When true, the effect should be disassociated with cells when it has finished processing.
Declaration
bool RemoveOnFinished { get; set; }
Property Value
Type | Description |
---|---|
bool |
RestoreCellOnRemoved
When true, indicates the EffectsManager should restore the cell to its original state.
Declaration
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
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
TimeSpan StartDelay { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
Methods
ApplyToCell(ColoredGlyphBase, ColoredGlyphBase)
Applies the state of the effect to a cell.
Declaration
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
Clone()
Returns a duplicate of this effect.
Declaration
ICellEffect Clone()
Returns
Type | Description |
---|---|
ICellEffect | A new copy of this effect. |
Restart()
Restarts the cell effect.
Declaration
void Restart()
Update(TimeSpan)
Updates the state of the effect.
Declaration
void Update(TimeSpan delta)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | delta | Time since the last call to this effect. |