Esempio n. 1
0
        void Update()
        {
            if (IsScreenVisible())
            {
                if (PhotonNetwork.inRoom)
                {
                    // toggle start button state
                    StartButton.Toggle(PhotonNetwork.isMasterClient);

                    // toggle map select
                    MapSelect.Toggle(PhotonNetwork.isMasterClient);

                    // toggle
                    WaitingMessage.Toggle(PhotonNetwork.isMasterClient == false);

                    // update room name
                    RoomName.text = String.Format("{0} ({1}/{2})", PhotonNetwork.room.Name, PhotonNetwork.room.PlayerCount, PhotonNetwork.room.MaxPlayers);

                    // update players list
                    UpdatePlayerList();

                    //
                    CheckForGameStart();
                }
                else
                {
                    UIRoom.HideScreen();
                    UILobby.ShowScreen();
                }
            }
        }