/// <summary> /// 删除所有的窗口 /// </summary> protected void DestroyAllFormClass() { for (int i = 0; i < _forms.Count; i++) { UIFormClass pc = _forms[i]; if (pc == null) { continue; } _forms[i] = null; UIFormHelper.DisposeFormClass(pc); } }
/// 销毁窗口对象 protected void DisposeFormClass <T>(ref T prefabClass) where T : UIFormClass, new() { if (null == prefabClass) { return; } for (int i = 0; i < _forms.Count; i++) { if (_forms[i] == prefabClass) { _forms[i] = null; break; } } //todo 这里应该等Form FadeOut动画完才能销毁 UIFormHelper.DisposeFormClass(ref prefabClass); }