Example #1
0
        public void Goto(GameObject destUi)
        {
            if (destUi == null)
            {
                return;
            }
            GUIBehavior destBehavior = destUi.GetComponent <GUIBehavior>();

            if (destBehavior == null)
            {
                return;
            }
            this.Close();
            destBehavior.Open();
        }
Example #2
0
        public GameObject OpenUI(GameObject ui, XTable attr = null)
        {
            if (ui == null)
            {
                return(null);
            }

            GUIBehavior behavior = ui.GetComponent <GUIBehavior>();

            if (behavior != null)
            {
                if (attr != null)
                {
                    behavior.attribute = attr;
                }
                behavior.Open();
            }

            return(ui);
        }