Skip to content

Struct SignalCondition

The state of the signal a screen receives, each kind of trouble from 0 to 1: interference getting into an otherwise good signal, a scrambling the set has no key for, the wear of a tape it was recorded on, and the damage of a digital stream it came down. A screen holds one as its steady signal, and a DarkEffekt.Terminal.Unity.SignalCue lays another over it for a while.

Declaration
[Serializable]
public struct SignalCondition

A clean signal.

Declaration
public static SignalCondition Clean { get; }

True when no kind of trouble is above zero.

Declaration
public bool IsClean { get; }
Declaration
[Header("Interference")]
[Tooltip("Bands of the picture pulled sideways.")]
[Range(0, 1)]
public float tearing
Declaration
[Tooltip("Scanlines shaking sideways.")]
[Range(0, 1)]
public float jitter
Declaration
[Tooltip("Static mixed into the picture, all the time.")]
[Range(0, 1)]
public float noise
Declaration
[Tooltip("Red and blue pulled apart.")]
[Range(0, 1)]
public float chroma
Declaration
[Tooltip("Brightness dips and a hum bar.")]
[Range(0, 1)]
public float luma
Declaration
[Tooltip("How much of the time the tearing, jitter, chroma, and luma show. Near zero is an occasional flicker; one is constant.")]
[Range(0, 1)]
public float frequency
Declaration
[Header("Scrambling")]
[Tooltip("The signal's sync lifted into the picture, as a channel the set has no key for. Bands of lines lose their sync as it rises: the first tears at about a third, half the picture past 0.6, and toward the top the picture rolls and the blanking shows as a bright bar.")]
[Range(0, 1)]
public float scramble
Declaration
[Tooltip("How far the set shows color once the burst is lost: 0 drops to black and white, 1 keeps the color with its hue drifting along the tears.")]
[Range(0, 1)]
public float scrambleColor
Declaration
[Header("Tape")]
[Tooltip("A worn recording: the picture softens, its color bleeds to the right, each line starts a little off, and a streaky grain comes up.")]
[Range(0, 1)]
public float tape
Declaration
[Tooltip("The tracking out: a band of noise and tearing drifting up the picture, and the head-switching tear along the bottom.")]
[Range(0, 1)]
public float tracking
Declaration
[Tooltip("Dropouts: white streaks where the tape has shed its oxide.")]
[Range(0, 1)]
public float dropouts
Declaration
[Header("Digital")]
[Tooltip("A stream compressed too far: the picture in blocks, each pulled toward its average, with its colors in steps.")]
[Range(0, 1)]
public float compression
Declaration
[Tooltip("A stream corrupted: bands of blocks slid sideways, and blocks filled from elsewhere in the picture, in the wrong colors.")]
[Range(0, 1)]
public float corruption

Every kind of interference at one level, showing that share of the time: 0.05 is an occasional flicker, 1 a badly broken signal. Nothing is scrambled.

Declaration
public static SignalCondition Noisy(float level)

DarkEffekt.Terminal.Unity.SignalCondition

Type Name
System.Single level

A scrambled signal at one level and nothing else wrong. The set keeps its color by the same level unless color says otherwise.

Declaration
public static SignalCondition Scrambled(float level, float color = -1)

DarkEffekt.Terminal.Unity.SignalCondition

Type Name
System.Single level
System.Single color

A worn tape at one level: the wear itself, the tracking a little under it, dropouts under that, and a touch of static.

Declaration
public static SignalCondition Vhs(float level)

DarkEffekt.Terminal.Unity.SignalCondition

Type Name
System.Single level

A digital stream in trouble at one level: compressed at the level, corrupted a little under it.

Declaration
public static SignalCondition Compressed(float level)

DarkEffekt.Terminal.Unity.SignalCondition

Type Name
System.Single level

The mix a burst of trouble is made of, at a strength from 0 to 1, showing all the time: tearing, jitter, and color at the strength, the brightness a little under it, and the static under that. The mix DarkEffekt.Terminal.Unity.TerminalScreenBase.Glitch(System.Single%2cSystem.Single) plays.

Declaration
public static SignalCondition Burst(float strength)

DarkEffekt.Terminal.Unity.SignalCondition

Type Name
System.Single strength

Each kind of trouble multiplied by a level. The frequency and the scramble color stay as they are.

Declaration
public SignalCondition Scaled(float level)

DarkEffekt.Terminal.Unity.SignalCondition

Type Name
System.Single level

Max(in SignalCondition, in SignalCondition)

Section titled “Max(in SignalCondition, in SignalCondition)”

The worse of each kind of trouble.

Declaration
public static SignalCondition Max(in SignalCondition a, in SignalCondition b)

DarkEffekt.Terminal.Unity.SignalCondition

Type Name
DarkEffekt.Terminal.Unity.SignalCondition a
DarkEffekt.Terminal.Unity.SignalCondition b

Add(in SignalCondition, in SignalCondition)

Section titled “Add(in SignalCondition, in SignalCondition)”

Each kind of trouble added, up to 1.

Declaration
public static SignalCondition Add(in SignalCondition a, in SignalCondition b)

DarkEffekt.Terminal.Unity.SignalCondition

Type Name
DarkEffekt.Terminal.Unity.SignalCondition a
DarkEffekt.Terminal.Unity.SignalCondition b

Lerp(in SignalCondition, in SignalCondition, float)

Section titled “Lerp(in SignalCondition, in SignalCondition, float)”

A condition a fraction of the way from one to another.

Declaration
public static SignalCondition Lerp(in SignalCondition a, in SignalCondition b, float t)

DarkEffekt.Terminal.Unity.SignalCondition

Type Name
DarkEffekt.Terminal.Unity.SignalCondition a
DarkEffekt.Terminal.Unity.SignalCondition b
System.Single t

Indicates whether the current object is equal to another object of the same type.

Declaration
public bool Equals(SignalCondition other)

System.Boolean: true if the current object is equal to the other parameter; otherwise, false.

Type Name Description
DarkEffekt.Terminal.Unity.SignalCondition other An object to compare with this object.

Indicates whether this instance and a specified object are equal.

Declaration
public override bool Equals(object obj)

System.Boolean: true if obj and this instance are the same type and represent the same value; otherwise, false.

Type Name Description
System.Object obj The object to compare with the current instance.

Returns the hash code for this instance.

Declaration
public override int GetHashCode()

System.Int32: A 32-bit signed integer that is the hash code for this instance.