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>
21 lines
598 B
C#
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;
|
|
}
|
|
}
|