This component works in conjunction with the NetworkRoomManager to make up the multiplayer room system. More...
Inherits NetworkBehaviour.
Public Member Functions | |
void | Start () |
Do not use Start - Override OnStartrHost / OnStartClient instead! More... | |
void | CmdChangeReadyState (bool readyState) |
virtual void | OnClientEnterRoom () |
This is a hook that is invoked on all player objects when entering the room. More... | |
virtual void | OnClientExitRoom () |
This is a hook that is invoked on all player objects when exiting the room. More... | |
virtual void | OnClientReady (bool readyState) |
This is a hook that is invoked on clients when a RoomPlayer switches between ready or not ready. More... | |
virtual void | OnGUI () |
Render a UI for the room. Override to provide your on UI More... | |
Public Attributes | |
bool | showRoomGUI = true |
This flag controls whether the default UI is shown for the room player. More... | |
bool | readyToBegin |
Diagnostic flag indicating whether this player is ready for the game to begin. More... | |
int | index |
Diagnostic index of the player, e.g. Player1, Player2, etc. More... | |
This component works in conjunction with the NetworkRoomManager to make up the multiplayer room system.
The RoomPrefab object of the NetworkRoomManager must have this component on it. This component holds basic room player data required for the room to function. Game specific data for room players can be put in other components on the RoomPrefab or in scripts derived from NetworkRoomPlayer.
void NobleConnect.Mirror.NobleRoomPlayer.CmdChangeReadyState | ( | bool | readyState | ) |
|
virtual |
This is a hook that is invoked on all player objects when entering the room.
Note: isLocalPlayer is not guaranteed to be set until OnStartLocalPlayer is called.
|
virtual |
This is a hook that is invoked on all player objects when exiting the room.
|
virtual |
This is a hook that is invoked on clients when a RoomPlayer switches between ready or not ready.
This function is called when the a client player calls CmdChangeReadyState.
readyState | Whether the player is ready or not. |
|
virtual |
Render a UI for the room. Override to provide your on UI
void NobleConnect.Mirror.NobleRoomPlayer.Start | ( | ) |
Do not use Start - Override OnStartrHost / OnStartClient instead!
int NobleConnect.Mirror.NobleRoomPlayer.index |
Diagnostic index of the player, e.g. Player1, Player2, etc.
bool NobleConnect.Mirror.NobleRoomPlayer.readyToBegin |
Diagnostic flag indicating whether this player is ready for the game to begin.
Invoke CmdChangeReadyState method on the client to set this flag.
When all players are ready to begin, the game will start. This should not be set directly, CmdChangeReadyState should be called on the client to set it on the server.
bool NobleConnect.Mirror.NobleRoomPlayer.showRoomGUI = true |
This flag controls whether the default UI is shown for the room player.
As this UI is rendered using the old GUI system, it is only recommended for testing purposes.