Refactor Assets/Scripts: trim restating comments, minor structure cleanups
Sweep over 48 files (Editor/ excluded): remove comments that restate the code, condense class summaries, fix three stale doc statements (HsvColorPicker alpha bar, PaintHud layoutPrefab, MasterVolume FallbackDefault). Inline two single-use wrappers (IsPointerOverUi, BuildModes), drop an unused using, replace a magic literal with the existing ParallaxBase constant, and convert ~10 UnityEngine.Object null checks to the implicit-bool convention. No serialized fields, signatures, RPC/NetworkVariable names, defaults, or #if blocks touched. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
eeee5fc2f0
commit
6c03e5d3f6
48 files changed
+289
-481
No files matched your search
@@ -5,12 +5,9 @@ using UnityEngine.InputSystem;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Dev-only connection harness for local multiplayer testing across the junction-mirror clones: one
|
||||
/// instance clicks Host and the others click Client (loopback 127.0.0.1 via the configured
|
||||
/// UnityTransport). Everyone spawns as the neutral Player prefab into the Lobby; roles (Hunter/Hider)
|
||||
/// are rolled and applied by <see cref="MatchManager"/> when the match starts, not here. Hotkeys:
|
||||
/// H = Host, C = Client, J = Server, K = Shutdown. Purely a testing scaffold - replace with real
|
||||
/// lobby/menu UI later. Attach to the same GameObject as the NetworkManager.
|
||||
/// Dev-only connection harness for local multiplayer testing: Host/Client/Server over loopback via the
|
||||
/// configured UnityTransport (hotkeys H/C/J, K = Shutdown). Roles are rolled by <see cref="MatchManager"/>
|
||||
/// at match start, not here. Testing scaffold only - replace with real lobby/menu UI later.
|
||||
/// </summary>
|
||||
[RequireComponent(typeof(NetworkManager))]
|
||||
[DisallowMultipleComponent]
|
||||
@@ -41,7 +38,7 @@ public class NetworkBootstrap : MonoBehaviour
|
||||
if (TypingGuard.IsTyping) return; // don't fire H/C/J/K while typing in a text field
|
||||
#if ENABLE_INPUT_SYSTEM
|
||||
var kb = Keyboard.current;
|
||||
if (kb == null || _net == null) return;
|
||||
if (kb == null || !_net) return;
|
||||
if (!_net.IsListening)
|
||||
{
|
||||
if (kb.hKey.wasPressedThisFrame) _net.StartHost();
|
||||
@@ -57,7 +54,7 @@ public class NetworkBootstrap : MonoBehaviour
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
if (!showGui || _net == null) return;
|
||||
if (!showGui || !_net) return;
|
||||
|
||||
GUILayout.BeginArea(new Rect(10, 10, 220, 160), GUI.skin.box);
|
||||
if (!_net.IsListening)
|
||||
|
||||
Reference in new issue
Block a user