public void CloseWindow(BasePanelWindow thisWindow)
    {
        if (openedWindowsList != null && openedWindowsList.Count > 0)
        {
            int idx = -1;
            idx = openedWindowsList.FindIndex(x => x == thisWindow);
            if (idx != -1)
            {
                openedWindowsList.RemoveAt(idx);
            }

            if (thisWindow.transferEnabled)
            {
                if (thisWindow != null)
                {
                    thisWindow.transform.parent = thisWindow.origParent;
                }
            }
            if (openedWindowsList.Count <= 0)
            {
                if (TransitionManager.GetInstance != null)
                {
                    TransitionManager.GetInstance.HideTabCover();
                }
            }
        }
        EventBroadcaster.Instance.PostEvent(EventNames.ENABLE_IN_GAME_INTERACTION);
    }
    public void CheckPanelWindow(string animName)
    {
        BasePanelWindow window = gameObject.GetComponent <BasePanelWindow>();

        if (window == null)
        {
            if (closeOnExit && animName == closeAnimationName)
            {
                this.gameObject.SetActive(false);
            }
        }
        else if (closeOnExit && animName == closeAnimationName)
        {
            window.CloseWindow();
        }
    }
    public void AddWindow(BasePanelWindow thisWindow)
    {
        if (openedWindowsList == null)
        {
            openedWindowsList = new List <BasePanelWindow>();
        }
        if (thisWindow.transferEnabled)
        {
            thisWindow.transform.parent = warningCanvasParent;
        }
        openedWindowsList.Add(thisWindow);
        EventBroadcaster.Instance.PostEvent(EventNames.DISABLE_IN_GAME_INTERACTION);

        if (TransitionManager.GetInstance != null)
        {
            if (TransitionManager.GetInstance.currentSceneManager.sceneType == SceneType.Battlefield &&
                TransitionManager.GetInstance.previousScene != SceneType.Battlefield)
            {
                Debug.Log("------------------------------------ STOPPING TIME -----------------------");
                Time.timeScale = 0.0f;
            }
            TransitionManager.GetInstance.ShowTabCover();
        }
    }