Table of Contents

Struct LightPulse

Namespace
BSGameLib.Game
Assembly
BSGameLib.Game.dll

A light's pulse: its intensity, and optionally its radius, swing either way along a sine.

public readonly record struct LightPulse : IEquatable<LightPulse>
Implements
Inherited Members

Remarks

The pulse follows the game's total time, not when the light was added, so a light removed and added again every frame pulses smoothly. Give lights different Offsets so they don't pulse in step.

Constructors

LightPulse(float, float, float, float)

A light's pulse: its intensity, and optionally its radius, swing either way along a sine.

public LightPulse(float Frequency, float Amplitude, float RadiusAmplitude = 0, float Offset = 0)

Parameters

Frequency float

Pulses a second.

Amplitude float

How far the intensity moves either way.

RadiusAmplitude float

How far the radius moves either way, as a multiple of the intensity's swing.

Offset float

Seconds to shift the pulse by.

Remarks

The pulse follows the game's total time, not when the light was added, so a light removed and added again every frame pulses smoothly. Give lights different Offsets so they don't pulse in step.

Properties

Amplitude

How far the intensity moves either way.

public float Amplitude { get; init; }

Property Value

float

Frequency

Pulses a second.

public float Frequency { get; init; }

Property Value

float

Offset

Seconds to shift the pulse by.

public float Offset { get; init; }

Property Value

float

RadiusAmplitude

How far the radius moves either way, as a multiple of the intensity's swing.

public float RadiusAmplitude { get; init; }

Property Value

float