Example #1
0
        public void Setup(UIPopup popup, WindowsController windowController)
        {
            if (popup != null)
            {
                this.popup = popup;
            }
            else
            {
                Debug.LogWarning("There's no UIPopup in the scene.");
            }

            this.windowController = windowController;
        }
        private void Awake()
        {
            if (Instance == null)
            {
                Instance = this;
            }
            else
            {
                Debug.LogWarning("Windows Controller is already exist.");
            }

            var     obj   = Resources.FindObjectsOfTypeAll <UIPopup>();
            UIPopup popUp = null;

            if (obj.Length > 0)
            {
                popUp = obj[0];
            }
            popupController.Setup(popUp, this);
            openedWindows = new List <IWindow>();
        }