Class Blinker
Blinks the foreground and background colors of a cell with the specified colors.
Implements
Inherited Members
Namespace: SadConsole.Effects
Assembly: SadConsole.dll
Syntax
[DataContract]
public class Blinker : CellEffectBase, ICellEffect
Constructors
Blinker()
Creates a new instance of the blink effect.
Declaration
public Blinker()
Properties
BlinkCount
How many times to blink. The value of -1 represents forever.
Declaration
[DataMember]
public int BlinkCount { get; set; }
Property Value
Type | Description |
---|---|
int |
BlinkOutBackgroundColor
The color the background blinks to.
Declaration
[DataMember]
public Color BlinkOutBackgroundColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
BlinkOutForegroundColor
The color the foreground blinks to.
Declaration
[DataMember]
public Color BlinkOutForegroundColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
BlinkSpeed
How long it takes to transition from blinking in and out.
Declaration
[DataMember]
public TimeSpan BlinkSpeed { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
Duration
The total duraction this effect will run for, before being flagged as finished. MaxValue represents forever.
Declaration
[DataMember]
public TimeSpan Duration { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
SwapColorsFromCell
When true, ignores the BlinkOutBackgroundColor and BlinkOutForegroundColor colors and instead swaps the glyph's foreground and background colors.
Declaration
[DataMember]
public bool SwapColorsFromCell { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
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
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. |