public void OpenKickConfirmWindow() { openingWindows[4].gameObject.SetActive(true); kickCitizenText.text = "Избавиться от жителя " + dialogueManager.citizen.GetShortName() + " ?"; buttonsManager.DisableButtons(); for (int i = 2; i < 5; i++) { buttonsManager.confirmacceptionButtons[i].interactable = true; } isBlockOpened[0] = true; Time.timeScale = 0; }
public void Pause(int check) { if ((Input.GetKeyDown(KeyCode.Escape) || check == 1) && !confirmCanvas.gameObject.activeInHierarchy) { if (!canvas.gameObject.activeInHierarchy) { gameController.dataController.globalData.isPaused = true; if (kickConfirmCanvas.gameObject.activeInHierarchy) { kickConfirmCanvas.gameObject.SetActive(false); } canvas.gameObject.SetActive(true); butManager.DisableButtons(); if (!gameController.IsAnyBlockOpened()) { Time.timeScale = 0; } } else { gameController.dataController.globalData.isPaused = false; canvas.gameObject.SetActive(false); if (!gameController.IsAnyBlockOpened()) { butManager.EnableButtons(); Time.timeScale = 1; } else { butManager.EnableConfirmButtons(); Debug.Log("Enabling"); butManager.EnableRaidButtons(); } } } }