private void InitController(UIWindowInfo info) { UIWindowEnum winName = info.windowEnum; string ctrlerName = info.ControllerName; Type type = Type.GetType(ctrlerName); if (type == null) { Debug.LogError(winName + "无法获取type ctrlerName" + ctrlerName); return; } UIBaseController controller = Activator.CreateInstance(type) as UIBaseController; if (controller == null) { Debug.LogError(winName + "无法生成controller"); return; } winCtrlerDict.Add((int)winName, controller); controller.RegisterEvent(); }
public void Subscribe(UIBaseController controller) { uIBaseControllers.Add(controller); }