Ejemplo n.º 1
0
 void OnMouseDown()
 {
     if (EmotionsGameManager.inputAllowed && (EmotionsGameManager.GetInstance().isTutorialRunning || EmotionsGameManager.GetInstance().gameStarted))
     {
         EmotionsGameManager.GetInstance().CheckEmotion(this.gameObject);
         EmotionsGameManager.GetInstance().subtitlePanel.GetComponent <SubtitlePanel> ().Display(emotions.ToString(), this.clipOfName);
     }
 }
Ejemplo n.º 2
0
    public void Display(string subtitle, AudioClip clip = null, bool queue = false)
    {
        if (!gameObject.activeSelf)
        {
            gameObject.SetActive(true);
        }

        if (sub == null)
        {
            sub = new Subtitle();
        }

        if (!queue || !isDisplaying)
        {
            isDisplaying = true;
            sub.Display(gameObject, textComp, subtitle, clip);
            if (EmotionsGameManager.GetInstance())
            {
                StartCoroutine(WaitTillHide(EmotionsGameManager.GetInstance().waitDuration));
            }
            else if (BMaze_Manager.GetInstance())
            {
                StartCoroutine(WaitTillHide(2f));
            }

            /*
             * else if (MemoryMatchGameManager.GetInstance ()) {
             *      StopCoroutine (WaitTillHide(3f));
             *      StartCoroutine (WaitTillHide (3f));
             * }
             */
        }
        else
        {
            Tuple <string, AudioClip> t = new Tuple <string, AudioClip>(subtitle, clip);
            displayQueue.Enqueue(t);
            t.ToString();
        }
    }