Class PulseEffect
Breathes a region's brightness up and down without changing anything it says.
Inherited Members
Namespace: Scylla.TextMode
Assembly: ScyllaTextMode.dll
Syntax
public sealed class PulseEffect : AmbientEffectBase, ITextEffect, IDisposable
Remarks
The usual way to draw attention to something without moving it: a warning that needs noticing, a prompt waiting on the player, a menu item under the cursor. Only colors change, so the text stays readable throughout.
A mask makes the brightness travel rather than move as one, so the same effect becomes a glow sweeping along a line of text or shimmering across it at random.
Properties
MaximumBrightness
Gets or sets the brightness at the top of the pulse. Values above 1 brighten past the color as drawn, which is what makes a pulse read as a glow rather than a dimming.
Declaration
public float MaximumBrightness { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
MinimumBrightness
Gets or sets the brightness at the bottom of the pulse, where 1 is the color as drawn.
Declaration
public float MinimumBrightness { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
PulseBackground
Gets or sets whether cell backgrounds pulse too. Off by default, since pulsing a filled panel is usually louder than the thing it was meant to draw attention to.
Declaration
public bool PulseBackground { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
OnAmbientStart()
Called when the effect starts, after the region has been captured.
Declaration
protected override void OnAmbientStart()
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
SetBrightnessRange(float, float)
Sets how far the brightness travels.
Declaration
public PulseEffect SetBrightnessRange(float minimum, float maximum)
Parameters
| Type | Name | Description |
|---|---|---|
| float | minimum | Brightness at the bottom of the pulse. |
| float | maximum | Brightness at the top. |
Returns
| Type | Description |
|---|---|
| PulseEffect | This effect, for chaining. |
SetPulseBackground(bool)
Chooses whether cell backgrounds pulse along with the text.
Declaration
public PulseEffect SetPulseBackground(bool pulseBackground)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | pulseBackground | True to pulse backgrounds too. |
Returns
| Type | Description |
|---|---|
| PulseEffect | This effect, for chaining. |