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
@@ -2,15 +2,12 @@ using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// On-screen match HUD binder: drives the authored <c>MatchHudCanvas</c> widgets from live match state -
|
||||
/// the current sub-phase + countdown (top centre) and a hunter crosshair during the seek phase. The visual
|
||||
/// layout lives in the scene; this component creates nothing at runtime, it only binds. Attach it to the
|
||||
/// MatchHudCanvas and wire the references in the Inspector.
|
||||
///
|
||||
/// Passive overlay: the authored canvas has no <see cref="UnityEngine.UI.GraphicRaycaster"/> and every graphic
|
||||
/// is raycastTarget=false, so it never consumes pointer events, and its sortingOrder (90) sits below PaintHud's
|
||||
/// (100) so tool panels always win. There is no change event for the phase/timer, so the values are polled once
|
||||
/// per frame; the visible strings are only rebuilt when the displayed second / phase actually changes.
|
||||
/// Binds the authored <c>MatchHudCanvas</c> widgets to live match state (sub-phase + countdowns, role
|
||||
/// counts, hunter crosshair); creates nothing at runtime. Passive overlay: the canvas has no
|
||||
/// <see cref="UnityEngine.UI.GraphicRaycaster"/> and every graphic is raycastTarget=false, and its
|
||||
/// sortingOrder (90) sits below PaintHud's (100) so tool panels always win. There is no change event for
|
||||
/// the phase/timer, so values are polled per frame; the visible strings are only rebuilt when the
|
||||
/// displayed second / phase actually changes.
|
||||
/// </summary>
|
||||
[DisallowMultipleComponent]
|
||||
public class MatchHud : MonoBehaviour
|
||||
|
||||
@@ -8,24 +8,16 @@ using UnityEngine.InputSystem;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// uGUI binding for <see cref="OnlineSessionManager"/>. Drives the server-browser canvas - Host / Refresh /
|
||||
/// pick a row / Join / Disconnect plus a status line - and mirrors the manager's state through its
|
||||
/// <see cref="OnlineSessionManager.Changed"/> / <see cref="OnlineSessionManager.SessionsChanged"/> events.
|
||||
/// Lives on the browser canvas; the session logic stays on the NetworkManager's
|
||||
/// <see cref="OnlineSessionManager"/>.
|
||||
/// uGUI binding for <see cref="OnlineSessionManager"/>: Host / Refresh / row select / Join / Disconnect
|
||||
/// plus a status line, mirroring the manager through its <see cref="OnlineSessionManager.Changed"/> /
|
||||
/// <see cref="OnlineSessionManager.SessionsChanged"/> events; the session logic stays on the manager.
|
||||
///
|
||||
/// Selection model: Refresh fills the list with clones of <see cref="entryTemplate"/> (each a clickable row
|
||||
/// showing name + player count). Clicking a row selects it; Join connects to the selected session. While
|
||||
/// connected, only Disconnect is interactable.
|
||||
///
|
||||
/// Overlay behaviour: the panel is always shown in Main (not connected). Once a connection is up it hides;
|
||||
/// in the lobby/map Esc toggles it back as a modal pause overlay (cursor freed, local gameplay suspended via
|
||||
/// <see cref="GameModeManager.SetPaused"/>). The Disconnect button is context-sensitive: in Main (not
|
||||
/// connected) it is an application "Exit" (quits the build, or stops play mode in the editor) so the player
|
||||
/// can leave without Alt+F4; on the map it becomes "Back to Lobby" for the match authority (ends the match);
|
||||
/// everyone else (in the lobby, or a non-authority client on the map) gets a plain disconnect. Only the
|
||||
/// visual <see cref="panelRoot"/> is toggled - this binder stays alive on its (always-active) canvas so it
|
||||
/// keeps reading Esc while the panel is hidden.
|
||||
/// The panel is always shown in Main (not connected); once a connection is up it hides, and in the
|
||||
/// lobby/map Esc toggles it back as a modal pause overlay (cursor freed, gameplay suspended via
|
||||
/// <see cref="GameModeManager.SetPaused"/>). The Disconnect button is context-sensitive: in Main it is an
|
||||
/// application "Exit"; on the map it becomes "Back to Lobby" for the match authority (ends the match);
|
||||
/// everyone else gets a plain disconnect. Only the visual <see cref="panelRoot"/> is toggled - this binder
|
||||
/// stays alive on its (always-active) canvas so it keeps reading Esc while the panel is hidden.
|
||||
/// </summary>
|
||||
public class OnlineSessionBrowserUI : MonoBehaviour
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user