Class ClientInteractableStateSystem
Applies server-authoritative world state for interactables that change the scene rather than opening a window.
public static class ClientInteractableStateSystem
- Inheritance
-
ClientInteractableStateSystem
- Inherited Members
Remarks
A switch throwing and a capture point flipping are world state: the server decides, and every client that can see the object has to be shown the result. Both already had a broadcast defined and sent — SwitchStateBroadcast to the observers of the switch, CapturePointUpdateBroadcast to the observers of the point — and neither had a single handler on the client, so a door opened on the server and stayed shut on every screen.
This lives outside the UI because neither message belongs to a panel. It resolves the object the message names through Objects, which the client populates from each interactable's spawn payload, and writes the state onto the component. Anything that wants to draw it — a target frame, a world label, an objective HUD — reads it from there.
Methods
Destroy()
Unregisters the world-state broadcast handlers.
public static void Destroy()
Initialize(Client)
Registers the world-state broadcast handlers.
public static void Initialize(Client client)
Parameters
clientClientThe client instance to bind to.