public IEnumerator Die(string message) { // Set variables IsDead = true; CanMove = false; CanShoot = false; HandleHighScore(); cam.GetComponent <CameraScroll>().IsScrollingDown = false; if (isTutorial) { yield break; } // Pause yield return(new WaitForSeconds(PostDeathTime)); // Show message List <string> m = new List <string>(); m.Add(message); StartCoroutine(MessageBox.ShowMessages(m)); // Pause yield return(new WaitForSeconds(PostDeathTime)); // Main Menu SceneManager.LoadScene("MainMenu"); }
private IEnumerator Tutorial01() { yield return(new WaitForSeconds(3f)); List <string> m = new List <string>(); m.Add("[Use the LEFT mouse button to drive]"); StartCoroutine(MessageBox.ShowMessages(m)); yield return(new WaitForSeconds(3f)); m.Clear(); m.Add("\"Hello, can you hear me?\""); m.Add("\"(Is this thing on...?)\""); StartCoroutine(MessageBox.ShowMessages(m)); yield return(new WaitForSeconds(3f)); m.Clear(); m.Add("\"You're piloting the DiveMaster 2000. My most expensive invention yet!\""); m.Add("\"Use it to dive DEEPER to the center of the planet.\""); m.Add("\"If we can be the first expedition crew to reach the core, I'll be rich!\""); StartCoroutine(MessageBox.ShowMessages(m)); yield return(new WaitForSeconds(1f)); m.Clear(); m.Add("\"...\""); m.Add("\"Sorry, I mean *WE'LL* be rich.\""); StartCoroutine(MessageBox.ShowMessages(m)); }