Exemple #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
     }
 }
Exemple #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);
     }
 }
    public void Interact()
    {
        if (isActiveAndEnabled)
        {
            if (dia == null)
            {
                dia = GameObject.FindGameObjectWithTag("GameController").GetComponent <ReadDialogueScript>();
            }
            // quest cycle+ check!
            // menu Setup
            menu = new List <string>();
            menu.Add(chatOption);
            // If shopscript, get it's line.
            menu.Add(keyOption);
            // IF ongoingQuest/TurnIn, getline(s)
            menu.Add(endOption);
            menu.Reverse();

            // if no auto...
            // send line to reader
            if (dia != null)
            {
                // send message.
                if (again)
                {
                    dia.ChatStart(myName, helloAgainLine, this.gameObject, false);
                }
                else
                {
                    dia.ChatStart(myName, helloLine, this.gameObject, false);
                }
                currentTalkState = TalkingState.hello;
            }
            else
            {
                Debug.LogError("ReadDialogueScript isn't on a thing w/ GameController tag!!");
            }                                                                                                    // just in case
        }
    }