Exemplo n.º 1
0
        public static IEnumerator DownLoadAssetBundle(string bundleName, OnLoadBundleFinish onLoadBundleFinish)
        {
            ResourceAPI      resourceAPI      = SimpleFactory.CreateResourceAPI();
            DownLoadEventAPI downLoadEventAPI = SimpleFactory.CreateDownLoadEventAPI();

            downLoadEventAPI.OnLoadBundleDelegate += onLoadBundleFinish;
            yield return(resourceAPI.LoadAssetBundle(bundleName, downLoadEventAPI));
        }
Exemplo n.º 2
0
        IEnumerator CreateIEnumerator()
        {
            ResourceAPI      resourceAPI      = SimpleFactory.CreateResourceAPI();
            DownLoadEventAPI downLoadEventAPI = SimpleFactory.CreateDownLoadEventAPI();

            downLoadEventAPI.OnLoadBundleDelegate += (AssetBundle bundle) =>
            {
                UIPackage.AddPackage(bundle);
                this.Inst <WindowManage>().OpenWindow(WindowNameFactory.GetLoginWindowName());
            };
            yield return(resourceAPI.LoadAssetBundle(BundleConst.WindowframeBundleName, downLoadEventAPI));
        }