Skip to content

Blink Class

Switches between the normal foreground of a cell and a specified color for an amount of time, and then repeats.

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

Inheritance objectCellEffectBase

Implements ICellEffect

Creates a new instance of the blink effect.

C#
public Blink()

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

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

When true, uses the current cells background color for fading instead of the value of BlinkOutColor.

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

The color the foreground blinks to.

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

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

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

The total duration 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