Class EffectSet
Chains one effect after another.
Inherited Members
Namespace: SadConsole.Effects
Assembly: SadConsole.dll
Syntax
[DataContract]
public class EffectSet : CellEffectBase, ICellEffect, IEnumerable<ICellEffect>, IEnumerable
Constructors
EffectSet()
Declaration
public EffectSet()
Properties
DelayBetweenEffects
An artificial delay between each effect.
Declaration
[DataMember]
public TimeSpan DelayBetweenEffects { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
Effects
The list of effects to process.
Declaration
[DataMember]
public LinkedList<ICellEffect> Effects { get; }
Property Value
Type | Description |
---|---|
LinkedList<ICellEffect> |
Repeat
Declaration
[DataMember]
public bool Repeat { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
Add(ICellEffect)
Adds an effect to the end of the Effects collection.
Declaration
public void Add(ICellEffect effect)
Parameters
Type | Name | Description |
---|---|---|
ICellEffect | effect | The effect to add. |
ApplyToCell(ColoredGlyphBase, ColoredGlyphBase)
Applies the state of the effect to a cell.
Declaration
public override 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
Overrides
Clone()
Returns a duplicate of this effect.
Declaration
public override ICellEffect Clone()
Returns
Type | Description |
---|---|
ICellEffect | A new copy of this effect. |
Overrides
GetEnumerator()
Gets an enumerator of all the effects.
Declaration
public IEnumerator<ICellEffect> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<ICellEffect> | The enumerator. |
Restart()
Restarts the cell effect but does not reset it.
Declaration
public override void Restart()
Overrides
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |
Overrides
Update(TimeSpan)
Updates the state of the effect.
Declaration
public override void Update(TimeSpan delta)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | delta | Time since the last call to this effect. |