public ASyncShow <AView> ShowASync(Type type, object data = null, Action <AView, object> onCreated = null, object token = null, Action <float> onProgress = null, Action <UnityEngine.Object> onLoaded = null) { var show = new ASyncShow <AView>(type); show.Begin(this, data, onCreated, token, onProgress, (obj) => { onLoaded?.Invoke(obj); BeforeShow(); }); return(show); }
public void ShowASync(Type type, object data = null, Action <AView, object> onCreated = null, object token = null, Action <float> onProgress = null, Action <UnityEngine.Object> onLoaded = null) { var show = new ASyncShow <AView>(type); show.Begin(this, data, onCreated, token, onProgress, onLoaded); }
/// <summary> /// 异步显示视图(使用该方式显示视图,请先在ViewFactory中注册AViewType) /// </summary> /// <param name="viewName"></param> /// <param name="data">传递的数据</param> /// <param name="onCreated">创建完成回调方法,会传回显示的视图以及token对象</param> /// <param name="onProgress">创建进度回调方法</param> public void ShowASync <AViewType>(object data = null, Action <AViewType, object> onCreated = null, object token = null, Action <float> onProgress = null, Action <UnityEngine.Object> onLoaded = null) where AViewType : AView { var show = new ASyncShow <AViewType>(); show.Begin(this, data, onCreated, token, onProgress, onLoaded); }