Trim restated narration, dead commented-out code, and oversized class headers; keep all why-comments (authority, timing, edge cases), tooltips, and serialization caveats. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
35 lines
1.0 KiB
C#
35 lines
1.0 KiB
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, and the middle
|
|
/// mouse button pans the framing (a temporary offset to line up the model).
|
|
/// </summary>
|
|
public class PaintMode : GameMode
|
|
{
|
|
public override string DisplayName => "Paint";
|
|
|
|
public override void Enter()
|
|
{
|
|
if (Manager.Player)
|
|
{
|
|
Manager.Player.enabled = true;
|
|
Manager.Player.ControlEnabled = false;
|
|
}
|
|
|
|
if (Manager.CameraInput)
|
|
{
|
|
Manager.CameraInput.LookMode = ThirdPersonOrbitInput.OrbitLookMode.HoldRightMouseButton;
|
|
Manager.CameraInput.PanEnabled = true;
|
|
}
|
|
|
|
if (Manager.Painter)
|
|
Manager.Painter.PaintingEnabled = true;
|
|
}
|
|
|
|
public override void Exit()
|
|
{
|
|
// Leaving paint mode releases the middle-mouse pan; the orbit input then eases the framing home.
|
|
if (Manager.CameraInput)
|
|
Manager.CameraInput.PanEnabled = false;
|
|
}
|
|
}
|