Ejemplo n.º 1
0
        public void CloseBox()
        {
            if (m_currentBox)
            {
                m_currentBox.gameObject.SetActive(false);
            }

            m_currentBox = null;
        }
Ejemplo n.º 2
0
        private void OpenUIBoxOpen <T>(GameObject uiObject, Dictionary <string, object> varList = null) where T : UIBox
        {
            if (uiObject)
            {
                T box = uiObject.GetComponent <T>();
                //box.PanelOpen();
                if (varList != null)
                {
                    box.m_userData = varList;
                }

                if (m_currentBox)
                {
                    m_currentBox.gameObject.SetActive(false);
                }

                uiObject.SetActive(true);
                m_currentBox = box;
            }
        }