Beispiel #1
0
    public void CloseUI(string UIName)
    {
        UUILoadBase UILoad = null;

        if (UIDic.TryGetValue(UIName, out UILoad))
        {
            //Logger.LogWarp.LogError("CloseUI " + UILoad.UIPrefabPath);

            GameObject.Destroy(UILoad.UIObj);
            UILoad.UIObj   = null;
            UILoad.UITrans = null;
        }
    }
Beispiel #2
0
    public void OpenUI(string UIName, bool isShow)
    {
        UUILoadBase UILoad = null;

        if (UIDic.TryGetValue(UIName, out UILoad))
        {
            UILoad.Load();
            UILoad.UIObj.SetActive(isShow);
            UILoad.UITrans.SetParent(UI_Root, false);
            //层级
            //UILoad.UITrans.SetAsLastSibling();
            //UILoad.UITrans.SetAsFirstSibling();
        }
    }
Beispiel #3
0
 public void RegisterUI(UUILoadBase UILoad)
 {
     UIDic.Add(UILoad.UIName, UILoad);
 }