Exemplo n.º 1
0
        public void UpdateDisplay(LobbyPlayerState lobbyPlayerState)
        {
            playerDisplayNameText.text = lobbyPlayerState.PlayerName.ToString();
            isReadyToggle.isOn         = lobbyPlayerState.IsReady;

            waitingForPlayerPanel.SetActive(false);
            playerDataPanel.SetActive(true);
        }
Exemplo n.º 2
0
 private void ToggleReadyServerRpc(ServerRpcParams serverRpcParams = default)
 {
     for (int i = 0; i < lobbyPlayers.Count; i++)
     {
         if (lobbyPlayers[i].ClientId == serverRpcParams.Receive.SenderClientId)
         {
             lobbyPlayers[i] = new LobbyPlayerState(
                 lobbyPlayers[i].ClientId,
                 lobbyPlayers[i].PlayerName,
                 !lobbyPlayers[i].IsReady
                 );
         }
     }
 }