Beispiel #1
0
 void Update()
 {
     if (m_Active)
     {
         if (Input.GetMouseButtonDown(0))
         {
             if (m_Writing)
             {
                 StopAllCoroutines();
                 m_Writing         = false;
                 m_PhraseText.text = m_Phrase;
             }
             else
             {
                 if (m_PhrasesQueue.Count != 0)
                 {
                     m_Phrase = m_PhrasesQueue.Dequeue();
                     StartCoroutine(WritePhrase(m_Phrase));
                 }
                 else
                 {
                     StartCoroutine(EndDialog());
                     m_PlayerController.SetVelocity(-m_PlayerVelocity);
                     m_PlayerController.SetCanMove(true);
                     GetComponent <BoxCollider2D>().enabled = false;
                     m_Active = false;
                 }
             }
         }
     }
 }