Skip to main content

PuzzleLightTarget

A class in Root.Township, the global namespace.

Light puzzle target: a puzzle condition that is complete while at least one beam hits it, shown by turning green or red.

Constructors​

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

Fields​

1 private and internal field
MemberWhat it is
private int hitCountNumber of beams hitting the target.

Methods​

MemberWhat it is
void BeginHit(Beam input)Counts the beam, marks complete and turns green.
void EndHit(Beam input)Uncounts the beam; when none are left, marks incomplete and turns red.
4 private and internal methods
MemberWhat it is
private void Awake()Starts red.
private void TurnGreen()Sets the renderer colour to green.
private void TurnRed()Sets the renderer colour to red.
private void Update()Empty.