Show / Hide Table of Contents

Class Blink

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

Inheritance
object
CellEffectBase
Blink
Implements
ICellEffect
Inherited Members
CellEffectBase._delayFinished
CellEffectBase._timeElapsed
CellEffectBase.IsFinished
CellEffectBase.CloneOnAdd
CellEffectBase.StartDelay
CellEffectBase.RemoveOnFinished
CellEffectBase.RestoreCellOnRemoved
CellEffectBase.RunEffectOnApply
object.GetType()
object.MemberwiseClone()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: SadConsole.Effects
Assembly: SadConsole.dll
Syntax
[DataContract]
public class Blink : CellEffectBase, ICellEffect

Constructors

Blink()

Creates a new instance of the blink effect.

Declaration
public Blink()

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

BlinkOutColor

The color the foreground blinks to.

Declaration
[DataMember]
public Color BlinkOutColor { 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 duration 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

UseCellBackgroundColor

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

Declaration
[DataMember]
public bool UseCellBackgroundColor { 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
Type Description
bool

true when this method modified the cell; otherwise false.

Overrides
CellEffectBase.ApplyToCell(ColoredGlyphBase, ColoredGlyphBase)

Clone()

Returns a duplicate of this effect.

Declaration
public override ICellEffect Clone()
Returns
Type Description
ICellEffect

A new copy of this effect.

Overrides
CellEffectBase.Clone()

Restart()

Restarts the cell effect but does not reset it.

Declaration
public override void Restart()
Overrides
CellEffectBase.Restart()

ToString()

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()

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.

Overrides
CellEffectBase.Update(TimeSpan)

Implements

ICellEffect

Extension Methods

ExtensionsSystem.GetDebuggerDisplayValue(object)
In this article

Back to top

Back to top Generated by DocFX