Commit 2acda392 authored by wangzhujun's avatar wangzhujun

1232

parent 70d5d71b
...@@ -233,6 +233,14 @@ export default class MainBase extends eui.UILayer { ...@@ -233,6 +233,14 @@ export default class MainBase extends eui.UILayer {
} else if (event.groupName == 'Delay') { } else if (event.groupName == 'Delay') {
this.trace("Delay组加载完成"); this.trace("Delay组加载完成");
GDispatcher.dispatchEvent('DelayLoaded'); GDispatcher.dispatchEvent('DelayLoaded');
RES.loadGroup("Map");
} else if (event.groupName == 'Map') {
this.trace("Map组加载完成");
GDispatcher.dispatchEvent('MapLoaded');
RES.loadGroup("Record");
} else if (event.groupName == 'Record') {
this.trace("Record组加载完成");
GDispatcher.dispatchEvent('RecordLoaded');
RES.removeEventListener(RES.ResourceEvent.GROUP_COMPLETE, this.onResourceLoadComplete, this); RES.removeEventListener(RES.ResourceEvent.GROUP_COMPLETE, this.onResourceLoadComplete, this);
RES.removeEventListener(RES.ResourceEvent.GROUP_LOAD_ERROR, this.onResourceLoadError, this); RES.removeEventListener(RES.ResourceEvent.GROUP_LOAD_ERROR, this.onResourceLoadError, this);
RES.removeEventListener(RES.ResourceEvent.GROUP_PROGRESS, this.onResourceProgress, this); RES.removeEventListener(RES.ResourceEvent.GROUP_PROGRESS, this.onResourceProgress, this);
......
{ {
"groups": [ "groups": [
{ {
"keys": "yylogo_png,yyhpklogo_png,yyhlogo_png,waitBtn_png,unriben_png,unmenggu_png,unhanguo_png,unCHNxianggang_png,unCHNtaiwan_png,unCHNhangzhou_png,unCHNaomen_png,unchaoxian_png,teamBtn_png,starttitle_png,startBtn_png,ruleBtn_png,riben_png,recordBtn_png,rankBtn_png,prizeBtn_png,menggu_png,lockBtn_png,littletitle_png,horn_png,hanguo_png,getBtn_png,fireBtn_png,CHNxianggang_png,CHNtaiwan_png,CHNhangzhou_png,CHNaomen_png,chaoxian_png,closeBtn_png", "keys": "yylogo_png,yyhpklogo_png,yyhlogo_png,waitBtn_png,unriben_png,unmenggu_png,unhanguo_png,unCHNxianggang_png,unCHNtaiwan_png,unCHNhangzhou_png,unCHNaomen_png,unchaoxian_png,teamBtn_png,starttitle_png,startBtn_png,startBG_jpg,ruleBtn_png,riben_png,recordBtn_png,rankBtn_png,prizeBtn_png,menggu_png,lockBtn_png,littletitle_png,horn_png,hanguo_png,getBtn_png,fireBtn_png,closeBtn_png,CHNxianggang_png,CHNtaiwan_png,CHNhangzhou_png,CHNaomen_png,chaoxian_png",
"name": "Preload" "name": "Preload"
}, },
{ {
"keys": "mrxg_png,mrtitle_png,mrtb_png,mrrb_png,mrmg_png,mrhz_png,mrhg_png,mrcx_png,mrbg_jpg,mram_png,mapshareBtn_png,mappass_png,mapBtn_png,rulebg_png,rankmybg_png,rankline_png,ranklight_png,rankbg2_png,lessscoreBtn_png,lessscorebg_png,finishlogo_png,finishlight_png,finishBtn_png,finishbg_png,progress_png,bg_png,xuanshiBtn_png", "keys": "certificate_btn_png,certificate_cover_png,certificate_jpg,joinshare_btn_png,joinshare_bg_jpg,sharestarter_bg_jpg,sharestarter_btn_png,sharestarter_sharebtn_png,share2mask_png,share2btn_png,share2bg_jpg,confirm_btn_png,confirm_bg_png,transfer _toast3_png,transfer _toast2_png,transfer _toast1_png,transfer _title_png,transfer _btn_png,trans_bg_jpg,teamshare_bg_jpg,teamshare_btn_png,transferrecord_bg_png,transferrecord_item_bg_png",
"name": "Normal" "name": "Normal"
}, },
{ {
"keys": "share2mask_png,share2btn_png,share2bg_jpg,sharestarter_sharebtn_png,sharestarter_btn_png,sharestarter_bg_jpg,joinshare_bg_jpg,joinshare_btn_png,certificate_btn_png,slogan_btn_png,slogan_bg_png,teamshare_btn_png,teamshare_bg_jpg,transfer _toast3_png,transfer _toast2_png,transfer _toast1_png,transfer _title_png,transfer _btn_png,trans_bg_jpg,transferrecord_item_bg_png,transferrecord_bg_png,confirm_bg_png,confirm_btn_png,关闭按钮 _png", "keys": "xuanshiBtn_png,xsbg_png,backstartBtn_png,bg_png,progress_png,slogan_btn_png,slogan_bg_png,rulebg_png,rankmybg_png,rankline_png,ranklight_png,rankbg2_png,rankbg_png,lessscoreBtn_png,lessscorebg_png,finishlogo_png,finishlight_png,finishBtn_png,finishbg_png,ydline_png,ydlight2_png,ydlight_png,hand2_png,hand_png",
"name": "Garbage" "name": "Garbage"
}, },
{ {
"keys": "box_png,head1_png,pkadd_png,pkagainBtn_png,pkaskBtn_png,pkBG_jpg,pkBtn_png,pkcirle_png,pkendbg_png,pkloselight_png,pkloselogo_png,pkmyline2_png,pknoton_png,pkotherline2_png,pkpeacelight_png,pkpeacelogo_png,pkprizebg_png,pkprizeBtn_png,pkrulebg_png,pkrulebtn_png,pkscorebg_png,pkscorebg2_png,pkwinbg_png,pkwinBtn_png,pkwinlight_png,pkwinlogo_png,ydline_png,ydlight2_png,ydlight_png,hand2_png,hand_png", "keys": "pkwinlogo_png,pkwinlight_png,pkwinBtn_png,pkwinbg_png,pkscorebg2_png,pkscorebg_png,pkrulebtn_png,pkrulebg_png,pkprizeBtn_png,pkprizebg_png,pkpeacelogo_png,pkpeacelight_png,pkotherline2_png,pknoton_png,pkmyline2_png,pkloselogo_png,pkloselight_png,pkfinishbg_png,pkendbg_png,pkcirle_png,pkBtn_png,pkBG_jpg,pkaskBtn_png,pkagainBtn_png,pkadd_png,head1_png,box_png",
"name": "Delay" "name": "Delay"
}, },
{ {
"name": "preload", "keys": "mapxg_png,maptb_png,mapshareBtn_png,maprb_png,mappass_png,mapmg_png,maphz_png,maphg_png,mapcx_png,mapBtn_png,mapam_png",
"keys": "backstartBtn_png,pkfinishbg_png,xsbg_png,startBG_jpg,rankbg_png,mapam_png,mapcx_png,maphg_png,maphz_png,mapmg_png,maprb_png,maptb_png,mapxg_png,certificate_cover_png,certificate_jpg" "name": "Map"
},
{
"keys": "mrxg_png,mrtitle_png,mrtb_png,mrrb_png,mrmg_png,mrhz_png,mrhg_png,mrcx_png,mrbg_jpg,mram_png",
"name": "Record"
} }
], ],
"resources": [ "resources": [
...@@ -598,79 +602,79 @@ ...@@ -598,79 +602,79 @@
"name": "progress_png" "name": "progress_png"
}, },
{ {
"name": "backstartBtn_png", "url": "assets/xuanshi/backstartBtn.png",
"type": "image", "type": "image",
"url": "assets/xuanshi/backstartBtn.png" "name": "backstartBtn_png"
}, },
{ {
"name": "pkfinishbg_png", "url": "assets/pk/pkfinishbg.png",
"type": "image", "type": "image",
"url": "assets/pk/pkfinishbg.png" "name": "pkfinishbg_png"
}, },
{ {
"name": "xsbg_png", "url": "assets/xuanshi/xsbg.png",
"type": "image", "type": "image",
"url": "assets/xuanshi/xsbg.png" "name": "xsbg_png"
}, },
{ {
"name": "startBG_jpg", "url": "assets/startScene/startBG.jpg",
"type": "image", "type": "image",
"url": "assets/startScene/startBG.jpg" "name": "startBG_jpg"
}, },
{ {
"name": "rankbg_png", "url": "assets/pop/rankbg.png",
"type": "image", "type": "image",
"url": "assets/pop/rankbg.png" "name": "rankbg_png"
}, },
{ {
"name": "mapam_png", "url": "assets/map/mapam.png",
"type": "image", "type": "image",
"url": "assets/map/mapam.png" "name": "mapam_png"
}, },
{ {
"name": "mapcx_png", "url": "assets/map/mapcx.png",
"type": "image", "type": "image",
"url": "assets/map/mapcx.png" "name": "mapcx_png"
}, },
{ {
"name": "maphg_png", "url": "assets/map/maphg.png",
"type": "image", "type": "image",
"url": "assets/map/maphg.png" "name": "maphg_png"
}, },
{ {
"name": "maphz_png", "url": "assets/map/maphz.png",
"type": "image", "type": "image",
"url": "assets/map/maphz.png" "name": "maphz_png"
}, },
{ {
"name": "mapmg_png", "url": "assets/map/mapmg.png",
"type": "image", "type": "image",
"url": "assets/map/mapmg.png" "name": "mapmg_png"
}, },
{ {
"name": "maprb_png", "url": "assets/map/maprb.png",
"type": "image", "type": "image",
"url": "assets/map/maprb.png" "name": "maprb_png"
}, },
{ {
"name": "maptb_png", "url": "assets/map/maptb.png",
"type": "image", "type": "image",
"url": "assets/map/maptb.png" "name": "maptb_png"
}, },
{ {
"name": "mapxg_png", "url": "assets/map/mapxg.png",
"type": "image", "type": "image",
"url": "assets/map/mapxg.png" "name": "mapxg_png"
}, },
{ {
"name": "certificate_cover_png", "url": "assets/certificate/certificate_cover.png",
"type": "image", "type": "image",
"url": "assets/certificate/certificate_cover.png" "name": "certificate_cover_png"
}, },
{ {
"name": "certificate_jpg", "url": "assets/certificate/certificate.jpg",
"type": "image", "type": "image",
"url": "assets/certificate/certificate.jpg" "name": "certificate_jpg"
} }
] ]
} }
\ No newline at end of file
...@@ -122,7 +122,7 @@ class Main extends MainBase { ...@@ -122,7 +122,7 @@ class Main extends MainBase {
//PanelCtrl.instance.show(ModuleTypes.MSG_PANEL, msgData) //PanelCtrl.instance.show(ModuleTypes.MSG_PANEL, msgData)
}, this); }, this);
// 监听当预加载资源加载完毕 // 监听当预加载资源加载完毕
GDispatcher.addEvent('DelayLoaded', () => { GDispatcher.addEvent('NormalLoaded', () => {
Waiting.instance.show() Waiting.instance.show()
this.createGameScene() this.createGameScene()
// Waiting.instance.hide() // Waiting.instance.hide()
...@@ -154,7 +154,17 @@ class Main extends MainBase { ...@@ -154,7 +154,17 @@ class Main extends MainBase {
RES.loadGroup("Delay"); RES.loadGroup("Delay");
} else if (event.groupName == "Delay") { } else if (event.groupName == "Delay") {
this.trace("Delay组加载完成"); this.trace("Delay组加载完成");
this.trace("开始加载Map资源");
GDispatcher.dispatchEvent('DelayLoaded'); GDispatcher.dispatchEvent('DelayLoaded');
RES.loadGroup("Map");
} else if (event.groupName == "Map") {
this.trace("Map组加载完成");
this.trace("开始加载Record资源");
GDispatcher.dispatchEvent('MapLoaded');
RES.loadGroup("Record");
} else if (event.groupName == "Record") {
this.trace("Record组加载完成");
GDispatcher.dispatchEvent('RecordLoaded');
RES.removeEventListener(RES.ResourceEvent.GROUP_COMPLETE, this.onResourceLoadComplete, this); RES.removeEventListener(RES.ResourceEvent.GROUP_COMPLETE, this.onResourceLoadComplete, this);
RES.removeEventListener(RES.ResourceEvent.GROUP_LOAD_ERROR, this.onResourceLoadError, this); RES.removeEventListener(RES.ResourceEvent.GROUP_LOAD_ERROR, this.onResourceLoadError, this);
RES.removeEventListener(RES.ResourceEvent.GROUP_PROGRESS, this.onResourceProgress, this); RES.removeEventListener(RES.ResourceEvent.GROUP_PROGRESS, this.onResourceProgress, this);
......
...@@ -104,7 +104,7 @@ export default class StartScene extends Scene { ...@@ -104,7 +104,7 @@ export default class StartScene extends Scene {
onEnterFrame(){ onEnterFrame(){
} }
initUI(data) { initUI(data) {
console.log(document.location.href);
this.once(egret.Event.ADDED_TO_STAGE, () => { this.once(egret.Event.ADDED_TO_STAGE, () => {
this.height = 750/window.innerWidth*window.innerHeight; this.height = 750/window.innerWidth*window.innerHeight;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment