Add game mode manager with player-control and paint modes

Introduce an extensible game mode system toggled with Tab:
- Player Control: WASD movement with always-on mouse camera orbit
- Paint: player frozen, left-click paints, right-click holds to orbit

Add GameMode base class, GameModeManager, and the two concrete modes.
Refactor controlled scripts to expose clean state flags instead of
handling input themselves: ThirdPersonOrbitInput.LookMode,
PlayerCharacterController.ControlEnabled, MeshPainter.PaintingEnabled.

Also fix camera zoom: remove the obsolete /120 wheel normalization so
one scroll notch maps to one zoomSpeed step under the new Input System.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 4.8 committed 2026-06-22 15:13:46 +02:00
1 parent 6e8ab4bc6d
commit dcb1fc42a6
12 files changed
+358 -55

No files matched your search

+53 -4
View File
@@ -152,16 +152,15 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: df129be8fadab79498bd429a59bb98e4, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::ThirdPersonOrbitInput
lookMode: 0
horizontalSensitivity: 0.2
verticalSensitivity: 0.15
invertY: 0
toggleKey: 3
startInLookMode: 1
enableZoom: 1
zoomSpeed: 0.5
minRadius: 1.5
maxRadius: 8
lockCursorInLookMode: 1
manageCursor: 1
--- !u!114 &172071432
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -779,7 +778,7 @@ MonoBehaviour:
m_EditorClassIdentifier: Assembly-CSharp::MeshPainter
useGpu: 1
brushColor: {r: 0, g: 0, b: 0, a: 1}
brushSize: 2
brushSize: 10
textureSize: 1024
baseColor: {r: 0.8, g: 0.8, b: 0.8, a: 1}
paddingTexels: 2
@@ -1205,6 +1204,55 @@ MonoBehaviour:
slideAcceleration: 20
maxSlideSpeed: 8
slideControl: 0.3
--- !u!1 &1516578026
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1516578028}
- component: {fileID: 1516578027}
m_Layer: 0
m_Name: GameManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1516578027
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1516578026}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 730466b26610d95498d22ab748d855a7, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::GameModeManager
player: {fileID: 1141039642}
cameraInput: {fileID: 172071431}
painter: {fileID: 682237521}
switchKey: 3
startModeIndex: 0
--- !u!4 &1516578028
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1516578026}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1774267801
GameObject:
m_ObjectHideFlags: 0
@@ -1302,3 +1350,4 @@ SceneRoots:
- {fileID: 963088882}
- {fileID: 200502122}
- {fileID: 172071436}
- {fileID: 1516578028}