Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Y
yyh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
yyh
Commits
2acda392
Commit
2acda392
authored
Dec 12, 2019
by
wangzhujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1232
parent
70d5d71b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
40 deletions
+62
-40
MainBase.ts
egret/libs/tl/MainBase.ts
+9
-1
default.res.json
egret/resource/default.res.json
+40
-36
Main.ts
egret/src/Main.ts
+12
-2
StartScene.ts
egret/src/startScene/StartScene.ts
+1
-1
No files found.
egret/libs/tl/MainBase.ts
View file @
2acda392
...
@@ -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
);
...
...
egret/resource/default.res.json
View file @
2acda392
{
{
"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,closeBt
n_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,chaoxia
n_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
egret/src/Main.ts
View file @
2acda392
...
@@ -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
(
'
Delay
Loaded'
,
()
=>
{
GDispatcher
.
addEvent
(
'
Normal
Loaded'
,
()
=>
{
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
);
...
...
egret/src/startScene/StartScene.ts
View file @
2acda392
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment