private void AddConsoleText(string locRef) { string str = LoLLocalize.Get(locRef); if (mConsoleLineStrings.Count == launchConsoleMaxLines) { //pop oldest string mConsoleLineStrings.Dequeue(); } mConsoleLineStrings.Enqueue(str); mConsoleStringBuffer.Remove(0, mConsoleStringBuffer.Length); bool isFirst = true; foreach (var line in mConsoleLineStrings) { if (isFirst) { isFirst = false; mConsoleStringBuffer.Append(line); } else { mConsoleStringBuffer.Append('\n').Append(line); } } launchConsoleText.text = mConsoleStringBuffer.ToString(); }
protected override IEnumerator Start() { yield return(base.Start()); //wait for LoL to load/initialize while (!LoLManager.instance.isReady) { yield return(null); } yield return(new WaitForSeconds(0.5f)); //start title if (titleText) { titleText.text = LoLLocalize.Get(titleStringRef); } if (titleGO) { titleGO.SetActive(true); } //show other stuff if (loadingGO) { loadingGO.SetActive(false); } if (readyGO) { readyGO.SetActive(true); } isStarted = true; }
IEnumerator Start() { if (HUD.instance.optionsRoot) { HUD.instance.optionsRoot.SetActive(false); } yield return(null); //wait for scene to load while (M8.SceneManager.instance.isLoading) { yield return(null); } //wait for LoL to load/initialize while (!LoLManager.instance.isReady) { yield return(null); } //start title titleText.text = LoLLocalize.Get(titleStringRef); titleGO.SetActive(true); if (HUD.instance.optionsRoot) { HUD.instance.optionsRoot.SetActive(true); } loadingGO.SetActive(false); readyGO.SetActive(true); //play music LoLMusicPlaylist.instance.PlayStartMusic(); isStarted = true; }