Beispiel #1
0
        private void UpdateRoomInfoDetail()
        {
            // Get current room information form the server.
            Room currentRoom = PhotonNetwork.room;

            double timeLeft    = GameRoomManager.CurrentGameMode.GetRoundTimeLeft();
            int    minutesLeft = Mathf.FloorToInt((float)timeLeft / 60);
            int    secondsLeft = Mathf.FloorToInt((float)timeLeft) % 60;

            if (minutesLeft <= 0 && secondsLeft <= 0)
            {
                GameRoomManager.Instance.ProcessLoaclGamePhase(GameRoomManager.GamePhase.RoundEnded);
                UIManager.Instance.HideUI(this);
            }

            m_RoomAndMapName.text = PhotonNetwork.room.name + " - " + GameMapManager.GetGameMap((int)(currentRoom.customProperties[RoomProperties.MapIndex])).GameMapName;

            m_RoomDetail.text = GameModeManager.GetGameModeName(GameModeManager.GameModes.FreeForAll) + " - " +
                                (int)currentRoom.customProperties[RoomProperties.RoundTimeLimit] + " " + GameLanguageManager.TimeUnit + " - " +
                                GameLanguageManager.TimeLeft + " " + minutesLeft.ToString() + ":" + secondsLeft.ToString("00");
        }