Example #1
0
        public static bool RemoveForm(FrmBase frm)
        {
            if (!inited)
            {
                Debug.LogError("You need call \"Init()\" method first");
                return(false);
            }

            int index = allForms.IndexOf(frm);

            if (index < 0)
            {
                return(false);
            }

            allForms.RemoveAt(index);
            return(true);
        }
Example #2
0
        public static void AddForm(FrmBase frm)
        {
            if (!inited)
            {
                Debug.LogError("You need call \"Init()\" method first");
                return;
            }

            if (frm == null)
            {
                return;
            }
            if (allForms.IndexOf(frm) >= 0)
            {
                return;
            }

            FormsRoot.AddChild(frm);
            allForms.Add(frm);
        }