Skip to main content

TempLaser

A class in Root.Township, the global namespace.

Prototype light emitter: raycasts forward each frame and tells any ILightDetectorTemp it hits when the beam starts and stops hitting it.

Constructors​

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

Fields​

3 private and internal fields
MemberWhat it is
private float distanceRay length.
private LayerMask maskLayers the ray hits.
private ILightDetectorTemp oldDetectorDetector hit last frame.

Methods​

1 private and internal method
MemberWhat it is
private void Update()Raycasts forward and calls BeginHit or EndHit when the hit detector changes.