/// <summary> /// /// </summary> protected override void Awake() { if (!isConnected) { return; } base.Awake(); GM = FindObjectOfType <bl_GameManager>(); UIReferences = FindObjectOfType <bl_UIReferences>(); this.GetComponent <bl_ChatRoom>().AddLine("Play " + GetGameMode.ToString() + " Mode"); ShowWarningPing = false; showMenu = true; if (AutoTeamSelection) { if (GetGameMode != GameMode.FFA) { StartCoroutine(CanSpawnIE()); } else { CanSpawn = true; } } if (VignetteImage && Use_Vignette) { VignetteImage.color = new Color(VignetteImage.color.r, VignetteImage.color.b, VignetteImage.color.g, VigAlpha); } StartCoroutine(FadeOut(1.5f)); GetPrefabs(); m_CanvasRoot.enabled = false; }
/// <summary> /// /// </summary> void Awake() { if (!isConnected) { return; } GM = FindObjectOfType <bl_GameManager>(); this.GetComponent <bl_ChatRoom>().AddLine("Play " + GetGameMode.ToString() + " Mode"); ShowWarningPing = false; m_window = 1; showMenu = true; if (AutoTeamSelection) { StartCoroutine(CanSpawnIE()); } if (VignetteImage && Use_Vignette) { VignetteImage.color = new Color(VignetteImage.color.r, VignetteImage.color.b, VignetteImage.color.g, VigAlpha); } StartCoroutine(FadeOut(1.5f)); GetPrefabs(); }
/// <summary> /// /// </summary> void GetRoomInfo() { string Mode = GetGameMode.ToString(); if (Mode == GameMode.FFA.ToString()) { m_GameMode = GameMode.FFA; CTFObjects.SetActive(false); FFAScoreboard.SetActive(true); TwoTeamsScoreboard.SetActive(false); #if BDGM if (BombDefuse != null) { BombDefuse.BombRoot.SetActive(false); } #endif #if CP CoverPoint.CPObjects.SetActive(false); #endif } else if (Mode == GameMode.TDM.ToString()) { m_GameMode = GameMode.TDM; CTFObjects.SetActive(false); TwoTeamsScoreboard.SetActive(true); FFAScoreboard.SetActive(false); #if BDGM if (BombDefuse != null) { BombDefuse.BombRoot.SetActive(false); } #endif #if CP CoverPoint.CPObjects.SetActive(false); #endif } else if (Mode == GameMode.CTF.ToString()) { m_GameMode = GameMode.CTF; CTFObjects.SetActive(true); TwoTeamsScoreboard.SetActive(true); FFAScoreboard.SetActive(false); #if BDGM if (BombDefuse != null) { BombDefuse.BombRoot.SetActive(false); } #endif #if CP CoverPoint.CPObjects.SetActive(false); #endif } #if BDGM else if (Mode == GameMode.SND.ToString()) { m_GameMode = GameMode.SND; CTFObjects.SetActive(false); if (BombDefuse != null) { BombDefuse.BombRoot.SetActive(true); } #if CP CoverPoint.CPObjects.SetActive(false); #endif TwoTeamsScoreboard.SetActive(true); FFAScoreboard.SetActive(false); } #endif #if CP else if (Mode == GameMode.CP.ToString()) { m_GameMode = GameMode.CP; CTFObjects.SetActive(false); #if BDGM if (BombDefuse != null) { BombDefuse.BombRoot.SetActive(false); } #endif TwoTeamsScoreboard.SetActive(false); FFAScoreboard.SetActive(false); CoverPoint.CPObjects.SetActive(true); bl_UIReferences.Instance.MaxKillsUI.SetActive(false); } #endif #if BDGM MaxBDRounds = (int)PhotonNetwork.room.CustomProperties[PropertiesKeys.BombDefuseRounds]; #endif TimeManager.m_RoundStyle = (RoundStyle)PhotonNetwork.room.CustomProperties[PropertiesKeys.RoomRoundKey]; RoomMenu.AutoTeamSelection = (bool)PhotonNetwork.room.CustomProperties[PropertiesKeys.TeamSelectionKey]; MaxKills = (int)PhotonNetwork.room.CustomProperties[PropertiesKeys.RoomMaxKills]; QualitySettings.SetQualityLevel(PlayerPrefs.GetInt(PropertiesKeys.Quality, 3)); AudioListener.volume = PlayerPrefs.GetFloat(PropertiesKeys.Volume, 1); int i = PlayerPrefs.GetInt(PropertiesKeys.Aniso, 2); if (i == 0) { QualitySettings.anisotropicFiltering = AnisotropicFiltering.Disable; } else if (i == 1) { QualitySettings.anisotropicFiltering = AnisotropicFiltering.Enable; } else { QualitySettings.anisotropicFiltering = AnisotropicFiltering.ForceEnable; } }