/// <summary> /// 创建,外部不要调用 /// </summary> public void Create(ModuleBase module) { Module = module; _forms = new JWArrayList <UIFormClass>(1); _inState = false; //注入到UI状态服务 UIStateService.GetInstance().AddMediator(this, GetBelongsUIStateName()); OnInitialize(); }
/// <summary> /// 销毁对象,外部不要调用 /// </summary> public void Destroy() { OnUninitialize(); UIStateService.GetInstance().RemoveMediator(this); for (int i = 0; i < _forms.Count; i++) { if (_forms[i] != null) { JW.Common.Log.LogE("UIMediator.Destroy : FormClass {0} of {1} is living", _forms[i].GetType().FullName, GetType().FullName); } } _inState = false; _forms.Clear(); Module = null; }