コード例 #1
0
        public void UpdateDisplay(LobbyPlayerState lobbyPlayerState)
        {
            playerDisplayNameText.text = lobbyPlayerState.PlayerName.ToString();
            isReadyToggle.isOn         = lobbyPlayerState.IsReady;

            waitingForPlayerPanel.SetActive(false);
            playerDataPanel.SetActive(true);
        }
コード例 #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
                 );
         }
     }
 }