示例#1
0
 public void Interact()
 {
     Debug.Log("Quiet");
     if (isActiveAndEnabled)
     {
         if (dia == null)
         {
             dia = GameObject.FindGameObjectWithTag("GameController").GetComponent <ReadDialogueScript>();
         }
         // quest check/clear: remove finished quests, check for an auto.
         //	if(quests.Count>0 && // questName)
         // if no auto...
         // send line to reader
         if (dia != null && !dia.IsTalking() && isActiveAndEnabled)
         {
             // send message.
             //isTalking = true;
             dia.enabled = true;
             if (again)
             {
                 dia.ChatStart(myName, chatAgainLine, this.gameObject, true);
             }
             else
             {
                 dia.ChatStart(myName, chatLine, this.gameObject, true);
             }
         }
         else
         {
             Debug.LogError("ReadDialogueScript isn't on a thing w/ GameController tag!!");
         }                                                                                                    // just in case
     }
 }
示例#2
0
 private void DelayMessage()
 {
     dia = GameObject.FindGameObjectWithTag("GameController").GetComponent <ReadDialogueScript>();
     if (!dia.IsTalking() && isActiveAndEnabled)
     {
         dia.enabled = true;
         dia.ChatStart(myName, lines, gameObject, true);
         //Debug.Log("Sending: " + myName + ": " + lines +", "+ dia.isActiveAndEnabled);
     }
 }