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
570 B
C#
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;
|
|
}
|
|
}
|