Skip to main content

PuzzleLightBeam

A class in Root.Township, the global namespace.

Light puzzle emitter: casts a Beam forward from its transform every frame. Base class for PuzzleLightMirror.

Constructors​

MemberWhat it is
PuzzleLightBeam()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

MemberWhat it is
protected float distanceBeam reach, 100 by default.
2 private and internal fields
MemberWhat it is
private Beam beamThe beam this emitter casts.
private LayerMask maskLayers the beam raycast hits.

Properties​

MemberWhat it is
float Distance { get; }How far the beam reaches.
LayerMask Mask { get; }Layers the beam can hit.

Methods​

MemberWhat it is
protected virtual void Awake()Creates the beam.
protected virtual void Update()Emits the beam from the object's position along its forward direction.