public void FireEvent() { if (onComplete != null) { var handler = onComplete; onComplete = null; handler(bundleInfo); } }
/// <summary> /// 加载完成的回调 /// </summary> public void AddListener(FastAssetBundleManager.FastLoadAssetCompleteHandler handler) { //如果已经下载完成了直接返回bundle完毕事件,否则就去加载并监听 if (isComplete) { if (handler != null) { handler.Invoke(bundleInfo); } } else { onComplete += handler; } }