OverrideHandle
public struct OverrideHandle : IDisposableNamespace TightBeam.Api
A scoped, per-field override on the flashlight for one owner. Set fields to drive the beam; Clear or Dispose to release them and let the player’s own settings show through. Safe no-op if TightBeam is absent.
Example
Dim and narrow the beam while the player is inside a zone:
OverrideHandle zone = Beam.BeginOverride("MyMod").SetIntensity(1f).SetSpotAngle(28f);// on leaving the zonezone.Dispose();Methods
Section titled “Methods”SetIntensity
Section titled “SetIntensity”public OverrideHandle SetIntensity(float v)Overrides the intensity until it is cleared.
| Parameter | |
|---|---|
v | The Unity light intensity, e.g. 1. It is not held to MinIntensity and MaxIntensity; below 0 shows as 0. |
SetRange
Section titled “SetRange”public OverrideHandle SetRange(float m)Overrides the range until it is cleared.
| Parameter | |
|---|---|
m | The range in metres. The drawn beam stays between 2 and 60. |
SetSpotAngle
Section titled “SetSpotAngle”public OverrideHandle SetSpotAngle(float deg)Overrides the cone angle until it is cleared.
| Parameter | |
|---|---|
deg | The full cone angle in degrees, e.g. 28. The drawn beam stays between 8 and 90. |
SetColor
Section titled “SetColor”public OverrideHandle SetColor(float r, float g, float b, float a = 1f)Overrides the colour until it is cleared.
| Parameter | |
|---|---|
r | Red, 0 to 1. |
g | Green, 0 to 1. |
b | Blue, 0 to 1. |
a | Alpha, 0 to 1. The default is 1. |
ClearIntensity
Section titled “ClearIntensity”public OverrideHandle ClearIntensity()ClearRange
Section titled “ClearRange”public OverrideHandle ClearRange()ClearSpotAngle
Section titled “ClearSpotAngle”public OverrideHandle ClearSpotAngle()ClearColor
Section titled “ClearColor”public OverrideHandle ClearColor()Dispose
Section titled “Dispose”public void Dispose()