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>
This commit is contained in:
adminandClaude Opus 4.8 committed 2026-06-22 17:26:41 +02:00
1 parent 3da613e1a1
commit f758c96dc5
8 files changed
+220 -427

No files matched your search

+5 -5
View File
@@ -1,6 +1,6 @@
/// <summary>
/// Mode 1: the player walks with WASD/Space and the camera orbits freely with
/// the mouse (cursor locked/hidden). Mesh painting is disabled.
/// Player walks with WASD/Space, the camera orbits freely with the mouse.
/// Painting is disabled.
/// </summary>
public class PlayerControlMode : GameMode
{
@@ -8,13 +8,13 @@ public class PlayerControlMode : GameMode
public override void Enter()
{
if (Manager.Player != null)
if (Manager.Player)
Manager.Player.ControlEnabled = true;
if (Manager.CameraInput != null)
if (Manager.CameraInput)
Manager.CameraInput.LookMode = ThirdPersonOrbitInput.OrbitLookMode.AlwaysActive;
if (Manager.Painter != null)
if (Manager.Painter)
Manager.Painter.PaintingEnabled = false;
}
}