Skip to content

Blinker Class

Blinks the foreground and background colors of a cell with the specified colors.

C#
[DataContract]
public class Blinker : CellEffectBase, ICellEffect

Inheritance objectCellEffectBase

Implements ICellEffect

Creates a new instance of the blink effect.

C#
public Blinker()

How long it takes to transition from blinking in and out.

C#
[DataMember]
public TimeSpan BlinkSpeed { get; set; }

The color the foreground blinks to.

C#
[DataMember]
public Color BlinkOutForegroundColor { get; set; }

The color the background blinks to.

C#
[DataMember]
public Color BlinkOutBackgroundColor { get; set; }

When true, ignores the BlinkOutBackgroundColor and BlinkOutForegroundColor colors and instead swaps the glyph’s foreground and background colors.

C#
[DataMember]
public bool SwapColorsFromCell { get; set; }

How many times to blink. The value of -1 represents forever.

C#
[DataMember]
public int BlinkCount { get; set; }

The total duraction this effect will run for, before being flagged as finished. MaxValue represents forever.

C#
[DataMember]
public TimeSpan Duration { get; set; }

ApplyToCell(ColoredGlyphBase, ColoredGlyphBase)

Section titled “ApplyToCell(ColoredGlyphBase, ColoredGlyphBase)”

Applies the state of the effect to a cell.

C#
public override bool ApplyToCell(ColoredGlyphBase cell, ColoredGlyphBase originalState)

cell ColoredGlyphBase
The surface cell using this effect.

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

bool
true when this method modified the cell; otherwise false.

Updates the state of the effect.

C#
public override void Update(TimeSpan delta)

delta TimeSpan
Time since the last call to this effect.

Restarts the cell effect but does not reset it.

C#
public override void Restart()

Returns a duplicate of this effect.

C#
public override ICellEffect Clone()

ICellEffect
A new copy of this effect.

C#
public override string ToString()

string