void OnTriggerStay2D(Collider2D other)
    {
        if (other.gameObject.name == "Player")
        {
            if (Input.GetKeyUp(KeyCode.E) && player.GetComponent <PlayerFlags>().money >= 30)
            {
                // dMan.ShowBox(dialogue);

                if (!dMan.dialogActive)
                {
                    dMan.dialogLines = dialogueLinesfinished;
                    dMan.currentLine = 0;
                    dMan.ShowDialogue();
                }
            }
            else if (Input.GetKeyUp(KeyCode.E) && player.GetComponent <PlayerFlags>().money <= 30)
            {
                // dMan.ShowBox(dialogue);

                if (!dMan.dialogActive)
                {
                    dMan.dialogLines = dialogueLines;
                    dMan.currentLine = 0;
                    dMan.ShowDialogue();
                }
            }
        }
    }
Exemplo n.º 2
0
 void OnTriggerStay(Collider other)
 {
     if (other.gameObject.name == "Player" && thePlayer.code == true)
     {
         print("first");
         if (Input.GetKeyUp(KeyCode.E))
         {
             // dMan.ShowBox(dialogue);
             print("middle");
             if (!dMan.dialogActive)
             {
                 print("last");
                 dMan.dialogLines = dialogueLinesfinished;
                 dMan.currentLine = 0;
                 dMan.ShowDialogue();
             }
         }
     }
 }