public void StartDialogue()
    {
        buttonManager.DisableRightMenuButtons();

        startButton.gameObject.SetActive(false);
        kickButton.gameObject.SetActive(false);
        closeButton.GetComponent <Button>().interactable = false;
        answerButton.gameObject.SetActive(true);

        sentences.Clear();
        answers.Clear();

        foreach (string sentence in dialogue.sentences)
        {
            sentences.Enqueue(sentence);
        }

        foreach (string answer in dialogue.answers)
        {
            answers.Enqueue(answer);
        }

        if (sentences.Count != answers.Count)
        {
            Debug.Log("Количество ответов и реплик не равно");
        }

        DisplayNextSentence();
    }
 public void OpenRaidResultWindow(string helperMessage)
 {
     Time.timeScale = 0;
     raidResultCanvas.gameObject.SetActive(true);
     buttonManager.DisableRightMenuButtons();
     gameController.isBlockOpened[3] = true;
     helperText.text     = helperMessage;
     helperText.fontSize = 16;
     if (helperMessage.Length > 320)
     {
         helperText.fontSize = 14;
     }
     if (helperMessage.Length > 400)
     {
         helperText.fontSize = 12;
     }
     if (helperMessage.Length > 100 && helperMessage.Length < 200)
     {
         helperText.text = "\n" + helperText.text;
     }
     if (helperMessage.Length < 100 && helperMessage.Length > 50)
     {
         helperText.text = "\n\n" + helperText.text;
     }
     if (helperMessage.Length < 50)
     {
         helperText.text = "\n\n\n" + helperText.text;
     }
 }
    public void OpenCitizenAcceptionWindow()
    {
        Time.timeScale   = 0;
        isBlockOpened[1] = true;
        buttonsManager.DisableRightMenuButtons();
        if (interButtons.Count > 0)
        {
            interButtons.Clear();
        }
        interCanvasObshinaAndRaid = -1;

        foreach (Button button in buttonsManager.gameButtons)
        {
            if (button.IsInteractable())
            {
                interButtons.Enqueue(button);
            }
        }

        for (int i = 0; i < 7; i += 3)
        {
            if (openingWindows[i].gameObject.activeInHierarchy) //Если включено окно общины, помощника или вылазки
            {
                interCanvasObshinaAndRaid = i;
            }
        }


        foreach (Button button in interButtons)
        {
            button.interactable = false;
        }

        if (interCanvasObshinaAndRaid != -1)
        {
            openingWindows[interCanvasObshinaAndRaid].gameObject.SetActive(false);
        }

        if (!openingWindows[5].gameObject.activeInHierarchy)
        {
            openingWindows[5].gameObject.SetActive(true);
        }
        buttonsManager.EnableConfirmButtons();

        citizenManager.GetNewCitizen();
    }
    public void QuittingGame()
    {
        gameController.dataController.globalData.isQuitting = true;
        if (!gameController.IsAnyBlockOpened())
        {
            buttonManager.DisableRightMenuButtons();
            Time.timeScale = 0;
        }

        interButtons.Clear();
        foreach (Button button in buttonManager.gameButtons)
        {
            if (button.IsInteractable())
            {
                interButtons.Enqueue(button);
            }
        }
        foreach (Button button in buttonManager.confirmacceptionButtons)
        {
            if (button.IsInteractable())
            {
                interButtons.Enqueue(button);
            }
        }

        foreach (Button button in interButtons)
        {
            button.interactable = false;
        }

        if (!myCanvas.gameObject.activeInHierarchy)
        {
            myCanvas.gameObject.SetActive(true);
        }

        buttonManager.DisablePauseButtons();
        key = 1;
    }