Пример #1
0
    public void OnUIPanelOpen(bool openWithBackground = true)
    {
        TimeManager.SetPauseTime();

        if (!(TacticalMode.IsEnabled() && openedUIPanels == 0) && openWithBackground)
        {
            blocker.SetActive(true);
        }

        openedUIPanels++;
        Debug.Log("UI opened: " + openedUIPanels);
    }
Пример #2
0
    public void OnUIPanelClose()
    {
        openedUIPanels--;

        if (openedUIPanels <= 0)
        {
            TimeManager.SetDefaultTime();
            openedUIPanels = 0;
            blocker.SetActive(false);
        }

        if (openedUIPanels == 1 && TacticalMode.IsEnabled())
        {
            blocker.SetActive(false);
        }

        Debug.Log("UI closed: " + openedUIPanels);
    }