Reorganize scripts into subfolders by responsibility

Move scripts under Assets/Scripts/ into Components, GameMode, Helper,
Network, Enum, Struct and ScriptableObject folders. Pure file moves
(plus folder .meta files); no code changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 4.8 committed 2026-07-02 15:02:15 +02:00
1 parent 382bfb36df
commit e23fae0c50
126 files changed
+112

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
using Unity.Netcode;
using UnityEngine;
/// <summary>
/// Per-avatar glue for a mid-match SPECTATOR. The spectator object is deliberately empty - no body, no
/// renderer, no collider, no controller - because the free-fly camera is a separate, persistent scene
/// object (in Main) that drives its own rig off Camera.main and needs nothing from this avatar. So the
/// spectator only has to exist as the owner's player object and flip the local mode set to free-cam-only.
/// The owner does that here; remote peers do nothing (there is no body to show or simulate). When the
/// host ends the match, MatchManager respawns this client as a neutral lobby Player.
/// </summary>
[DisallowMultipleComponent]
public class SpectatorSetup : NetworkBehaviour
{
public override void OnNetworkSpawn()
{
if (!IsOwner) return;
var manager = FindFirstObjectByType<GameModeManager>(FindObjectsInactive.Include);
if (manager) manager.BindSpectator();
}
}