Files
chameleon/Assets/Scripts/PlayerControlMode.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
570 B
C#

/// <summary>
/// Player walks with WASD/Space, the camera orbits freely with the mouse.
/// Painting is disabled.
/// </summary>
public class PlayerControlMode : GameMode
{
public override string DisplayName => "Player Control";
public override void Enter()
{
if (Manager.Player)
Manager.Player.ControlEnabled = true;
if (Manager.CameraInput)
Manager.CameraInput.LookMode = ThirdPersonOrbitInput.OrbitLookMode.AlwaysActive;
if (Manager.Painter)
Manager.Painter.PaintingEnabled = false;
}
}