public void Click()
 {
     if (dialogueNum < dialogue.Length)
     {
         if (txt != null)
         {
             txt.text = "";
             setText  = dialogue[dialogueNum].Replace("[player]", JsonFile.save.PlayerData.playerName);
             dialogueNum++;
             toDisplay = true;
         }
     }
     else
     {
         CancelInvoke("DisplayText");
         menu.CloseWindow();
         if (endFunct != null)
         {
             endFunct.Invoke();
         }
         if (nextDialogue != null)
         {
             nextDialogue.OpenDialogue();
         }
     }
 }
 public void Click()
 {
     nextDialogue.OpenDialogue();
 }