Class StaticTuneInEffect
Fills the region with churning static and lets the new screen resolve out of it, the way an old set finds a signal.
Inherited Members
Namespace: Scylla.TextMode
Assembly: ScyllaTextMode.dll
Syntax
public sealed class StaticTuneInEffect : TransitionEffectBase, ITextEffect, IDisposable
Remarks
Every cell starts as noise. As the effect runs, each cell's signal strengthens until the static gives way to the content underneath. Cells with a weak signal still flicker back into noise now and then, so the picture arrives unevenly rather than by a clean edge sweeping across, which is what separates this from a dissolve.
The order cells find their signal in comes from the mask, and a noise field is the default because it gives the blotchy, patchy arrival of a real signal. The static itself is re-rolled several times a second rather than every frame, and a cell that has found its signal is written once rather than rewritten on every tick that follows.
Only the timing is reproducible from the effect's seed. Which cell is showing noise on any given frame depends on when the churn last fired, so this effect is not suited to comparing screenshots frame by frame.
Properties
ChurnRate
Gets or sets how many times a second the static is re-rolled.
Declaration
public float ChurnRate { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
StaticColor
Gets or sets the color the static is drawn in.
Declaration
public Color32 StaticColor { get; set; }
Property Value
| Type | Description |
|---|---|
| Color32 |
StaticSet
Gets or sets the characters the static is made of. Characters the font cannot draw are dropped when the effect starts.
Declaration
public string StaticSet { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
OnEffectRelease()
Called when the effect is disposed. Return anything rented from the context here.
Declaration
protected override void OnEffectRelease()
Overrides
OnEffectTick(float, float)
Called once per tick to draw the effect at the given progress.
Declaration
protected override void OnEffectTick(float progress, float easedProgress)
Parameters
| Type | Name | Description |
|---|---|---|
| float | progress | Linear progress from 0 to 1. |
| float | easedProgress | Progress with the easing curve applied. |
Overrides
OnTransitionStart()
Called when the effect starts, after both the starting and target states are ready.
Declaration
protected override void OnTransitionStart()
Overrides
SetChurnRate(float)
Sets how many times a second the static is re-rolled.
Declaration
public StaticTuneInEffect SetChurnRate(float churnRate)
Parameters
| Type | Name | Description |
|---|---|---|
| float | churnRate | Re-rolls per second. |
Returns
| Type | Description |
|---|---|
| StaticTuneInEffect | This effect, for chaining. |
SetStaticColor(Color32)
Sets the color the static is drawn in.
Declaration
public StaticTuneInEffect SetStaticColor(Color32 color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color32 | color | Color for the noise. |
Returns
| Type | Description |
|---|---|
| StaticTuneInEffect | This effect, for chaining. |
SetStaticSet(string)
Sets the characters the static is made of.
Declaration
public StaticTuneInEffect SetStaticSet(string staticSet)
Parameters
| Type | Name | Description |
|---|---|---|
| string | staticSet | The characters to use as noise. |
Returns
| Type | Description |
|---|---|
| StaticTuneInEffect | This effect, for chaining. |