public virtual void OnClose()
 {
     Go?.SetActive(false);
     for (int i = 0; i < Childs.Count; i++)
     {
         MonoBaseClass childNode = Childs.Pop();
         ReferenceMgr.Instance.Release(childNode);
         childNode?.OnClose();
     }
     if (Go)
     {
         timerID = TimerMgr.Instance.AddTimer(destoryTime, 1, () =>
         {
             Object.DestroyImmediate(Go);
             OnDestory();
         });
     }
 }
Beispiel #2
0
 //隐藏GameObject
 public void Hide(MonoBaseClass mb)
 {
     ReferenceMgr.Instance.Release(mb);
     mb?.OnClose();
 }