|
@@ -11,7 +11,6 @@ class BundleLoaderManager {
|
|
constructor() {
|
|
constructor() {
|
|
this.taskList = {};
|
|
this.taskList = {};
|
|
this.GameBtnNode = [];
|
|
this.GameBtnNode = [];
|
|
- this.bPreLoadLB = false;
|
|
|
|
this.bundleBaseData = {
|
|
this.bundleBaseData = {
|
|
[GameConstant.KIND_ID_BRAB]: {
|
|
[GameConstant.KIND_ID_BRAB]: {
|
|
bundle: "BRAB",
|
|
bundle: "BRAB",
|
|
@@ -255,11 +254,7 @@ class BundleLoaderManager {
|
|
preLoadBundle(wKindID, tdata){
|
|
preLoadBundle(wKindID, tdata){
|
|
let data = tdata ? tdata : this.loadBundleData(wKindID);
|
|
let data = tdata ? tdata : this.loadBundleData(wKindID);
|
|
let readyLoaderBundle = null;
|
|
let readyLoaderBundle = null;
|
|
- if(this.bPreLoadLB){
|
|
|
|
- data.importBundle = [];
|
|
|
|
- }
|
|
|
|
if(data.importBundle.length > 0){
|
|
if(data.importBundle.length > 0){
|
|
- this.bPreLoadLB = true;
|
|
|
|
readyLoaderBundle = data.importBundle[0];
|
|
readyLoaderBundle = data.importBundle[0];
|
|
}else{
|
|
}else{
|
|
readyLoaderBundle = data.bundle;
|
|
readyLoaderBundle = data.bundle;
|
|
@@ -279,7 +274,7 @@ class BundleLoaderManager {
|
|
}
|
|
}
|
|
bundle.preload(tempUrl, cc.Prefab, ()=>{
|
|
bundle.preload(tempUrl, cc.Prefab, ()=>{
|
|
}, (err, prefab)=>{
|
|
}, (err, prefab)=>{
|
|
- // console.log('完成的kind: ', wKindID, err);
|
|
|
|
|
|
+ console.log('完成的kind: ', wKindID, err);
|
|
if(wKindID == 3100 || wKindID == 3101){ //预加载完成后, 设置大厅按钮的spine动画.
|
|
if(wKindID == 3100 || wKindID == 3101){ //预加载完成后, 设置大厅按钮的spine动画.
|
|
EventMgr.getInstance().postEvent('setBtnBundle', {wKindID: wKindID});
|
|
EventMgr.getInstance().postEvent('setBtnBundle', {wKindID: wKindID});
|
|
}
|
|
}
|