Files
chameleon/Assets/Scripts/PaintMode.cs
T
adminandClaude Opus 4.8 f758c96dc5 Trim comments and use implicit null checks for Unity objects
Reduce comments to non-obvious "why" notes and convert UnityEngine.Object
null checks to implicit bool (if (obj) / if (!obj)). Input System devices
(Mouse.current, Keyboard.current) and plain arrays keep explicit != null.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 17:26:41 +02:00

21 lines
598 B
C#

/// <summary>
/// Player stands still, the mesh is painted with the left mouse button. The
/// camera orbits only while the right mouse button is held.
/// </summary>
public class PaintMode : GameMode
{
public override string DisplayName => "Paint";
public override void Enter()
{
if (Manager.Player)
Manager.Player.ControlEnabled = false;
if (Manager.CameraInput)
Manager.CameraInput.LookMode = ThirdPersonOrbitInput.OrbitLookMode.HoldRightMouseButton;
if (Manager.Painter)
Manager.Painter.PaintingEnabled = true;
}
}