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
 //	public Vector3 returnPos;
 void awake()
 {
     if (messageDelay == 0)
     {
         messageDelay = 0.2f;
     }
     dia = GameObject.FindGameObjectWithTag("GameController").GetComponent <ReadDialogueScript>();
 }
    // new quest list
    // ongoing quest list

    // Start is called before the first frame update
    void Start()
    {
        dia = GameObject.FindGameObjectWithTag("GameController").GetComponent <ReadDialogueScript>();
        //Get base lines
        DataStorage.npcChat.TryGetValue(name + "Hello", out helloLine);
        DataStorage.npcChat.TryGetValue(name + "Hello Again", out helloAgainLine);
        DataStorage.npcChat.TryGetValue(name + "Key", out keyLine);
        DataStorage.npcChat.TryGetValue(name + "Chat", out chatLine);
        DataStorage.npcChat.TryGetValue(name + "Nevermind", out nevermindLine);
    }
Exemple #4
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);
     }
 }
Exemple #5
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Player") && isActiveAndEnabled)
        {
            dia = GameObject.FindGameObjectWithTag("GameController").GetComponent <ReadDialogueScript>();
            //dia.ActivateBox(true,myName);
            //	Invoke("DelayMessage", messageDelay);
            DelayMessage();

            //	GameObject.FindGameObjectWithTag("LevelController").GetComponent<LevelControllerScript>().BGMVolume(newVol, false, 0.5f);
        }
    }
    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
        }
    }
Exemple #7
0
 // Start is called before the first frame update
 void Start()
 {
     dia = GameObject.FindGameObjectWithTag("GameController").GetComponent <ReadDialogueScript>();
 }