public void StartFireMinigame(int numFires = 8)//starts the minigame. recommended number of fires to spawn is 8
 {
     if (minigameIsFinished)
     {
         return;//don't let them start the minigame if they've already completed it
     }
     if (minigameIsRunning)
     {
         return;//don't let them start the fire minigame while it's already running
     }
     canSpawnFire = true;
     totalFires   = numFires;
     popupText.DisplayPopupText("Put out the fires before the office burns down!");
     minigameIsRunning = true;
 }
        private IEnumerator DisplayErrorForSeconds(string text, float speechTime)
        {
            _pauseTyping = true;
            errorPopup.DisplayPopupText(text);

            yield return(new WaitForSeconds(speechTime));

            _pauseTyping = false;
            errorPopup.HidePopupText();
        }
        private IEnumerator DisplayPopupAfterSeconds(PopupText popup, string text, float speechTime)
        {
            var popupTime = Time.time + speechTime;

            while (popupTime > Time.time)
            {
                if (_skipPresentation)
                {
                    break;
                }
                yield return(null);
            }
            popup.DisplayPopupText(text);
        }