public void UpdateDisplay(LobbyPlayerState lobbyPlayerState) { playerDisplayNameText.text = lobbyPlayerState.PlayerName.ToString(); isReadyToggle.isOn = lobbyPlayerState.IsReady; waitingForPlayerPanel.SetActive(false); playerDataPanel.SetActive(true); }
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 ); } } }