public void StartGameLoad() { if (!_AudienceInteractionManager.IsConnectedToServer || GameInfo.RoomId == "0000") { return; } for (var i = 0; i < GameInfo.PlayerNumber; i++) { GamepadMgr.Pad(i).BlockGamepad(true); } //_LoadingPanel.SetActive(true); //_LoadingPanel.GetComponent<LoadingScreenManager>().Title.text = "Loading..."; _AudienceInteractionManager?.SendPlayerCharacteristics(Ext.ToList(PlayersInstances.Values)); _AudienceInteractionManager?.SendStopIngredientPoll(); }
private IEnumerator StartGame() { m_audioSource = GetComponent <AudioSource>(); if (m_audioSource) { m_audioSource.PlayDelayed(0.1f); //Start trumpet } ShowIngredientTheme(); m_countdown = true; var fontSize = m_clock.fontSize; m_clock.fontSize = 200; m_clock.text = "5"; yield return(new WaitForSeconds(1)); m_clock.text = "4"; yield return(new WaitForSeconds(1)); m_clock.text = "3"; yield return(new WaitForSeconds(1)); m_clock.text = "2"; yield return(new WaitForSeconds(1)); m_clock.text = "1"; yield return(new WaitForSeconds(1)); m_clock.fontSize = fontSize; m_clock.rectTransform.parent = topRightClock; m_clock.rectTransform.localPosition = Vector3.zero; for (var i = 0; i < GameInfo.PlayerNumber; i++) { GamepadMgr.Pad(i).BlockGamepad(false); } var gameMusic = GameObject.Find("ArenaMusic").GetComponent <AudioSource>(); gameMusic.Play(); m_countdown = false; cheers = GetComponent <Cheering>(); StartCoroutine(PrepareCheers()); }
private IEnumerator ExitLoadingScreen() { AudioListener.volume = 0.0f; for (var i = 0; i < GameInfo.PlayerNumber; i++) { GamepadMgr.Pad(i).BlockGamepad(true); } _LoadingPanel.SetActive(true); _LoadingPanel.GetComponent <LoadingScreenManager>().Title.text = "Loading..."; yield return(new WaitForSeconds(LOADING_TIME)); AudioListener.volume = 1f; StartCoroutine(MiniTransition.Get().SequenceOut(null, _HidePanel())); StartCoroutine(StartGame()); }