Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
DuibaGameTemplate
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
钱根
DuibaGameTemplate
Commits
f0a8bbb3
Commit
f0a8bbb3
authored
Oct 27, 2021
by
Master Q
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
16714916
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
649 additions
and
8 deletions
+649
-8
ResJson.ts
src/ResJson.ts
+646
-7
SoundWeb.ts
src/SoundWeb.ts
+3
-1
No files found.
src/ResJson.ts
View file @
f0a8bbb3
...
@@ -2,32 +2,671 @@ export const ResJson = {
...
@@ -2,32 +2,671 @@ export const ResJson = {
"groups"
:
[
"groups"
:
[
{
{
"keys"
:
"boom.png,clock-pointer.png,countdown-back.png"
,
"keys"
:
"boom.png,clock-pointer.png,countdown-back.png"
,
"name"
:
"GameEle"
"name"
:
"GameEle"
,
"atlas"
:
{
"countdown-back.png"
:
{
"x"
:
2
,
"y"
:
2
,
"w"
:
145
,
"h"
:
58
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
145
,
"sh"
:
58
,
"ro"
:
false
},
"boom.png"
:
{
"x"
:
2
,
"y"
:
62
,
"w"
:
131
,
"h"
:
124
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
131
,
"sh"
:
124
,
"ro"
:
false
},
"clock-pointer.png"
:
{
"x"
:
135
,
"y"
:
62
,
"w"
:
5
,
"h"
:
17
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
5
,
"sh"
:
17
,
"ro"
:
false
}
}
},
},
{
{
"keys"
:
"GameScene-back.png,GameScene-back2.png,boomScore.png,extra-score.png,extra_scene.png,guidance4-1.png,guidance4-2.png,guidance4-3.png,guidance5-0.png,guidance5-1.png,guidance5-2.png,guidance5-3.png,guidance5-t.png,mission-goal.png,shortcut_icon.png,title-back.png"
,
"keys"
:
"GameScene-back.png,GameScene-back2.png,boomScore.png,extra-score.png,extra_scene.png,guidance4-1.png,guidance4-2.png,guidance4-3.png,guidance5-0.png,guidance5-1.png,guidance5-2.png,guidance5-3.png,guidance5-t.png,mission-goal.png,shortcut_icon.png,title-back.png"
,
"name"
:
"GameScene"
"name"
:
"GameScene"
,
"atlas"
:
{
"GameScene-back.png"
:
{
"x"
:
2
,
"y"
:
2
,
"w"
:
1624
,
"h"
:
750
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
1624
,
"sh"
:
750
,
"ro"
:
false
},
"GameScene-back2.png"
:
{
"x"
:
2
,
"y"
:
754
,
"w"
:
1624
,
"h"
:
750
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
1624
,
"sh"
:
750
,
"ro"
:
false
},
"extra_scene.png"
:
{
"x"
:
2
,
"y"
:
1506
,
"w"
:
1624
,
"h"
:
421
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
1624
,
"sh"
:
421
,
"ro"
:
false
},
"guidance4-3.png"
:
{
"x"
:
1628
,
"y"
:
2
,
"w"
:
500
,
"h"
:
45
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
500
,
"sh"
:
45
,
"ro"
:
true
},
"guidance5-0.png"
:
{
"x"
:
1675
,
"y"
:
2
,
"w"
:
264
,
"h"
:
134
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
264
,
"sh"
:
134
,
"ro"
:
true
},
"title-back.png"
:
{
"x"
:
1675
,
"y"
:
268
,
"w"
:
240
,
"h"
:
75
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
240
,
"sh"
:
75
,
"ro"
:
true
},
"guidance5-1.png"
:
{
"x"
:
1752
,
"y"
:
268
,
"w"
:
50
,
"h"
:
206
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
50
,
"sh"
:
206
,
"ro"
:
false
},
"guidance5-3.png"
:
{
"x"
:
1628
,
"y"
:
510
,
"w"
:
139
,
"h"
:
205
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
139
,
"sh"
:
205
,
"ro"
:
false
},
"guidance5-2.png"
:
{
"x"
:
1628
,
"y"
:
717
,
"w"
:
140
,
"h"
:
193
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
140
,
"sh"
:
193
,
"ro"
:
false
},
"mission-goal.png"
:
{
"x"
:
1628
,
"y"
:
912
,
"w"
:
182
,
"h"
:
77
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
182
,
"sh"
:
77
,
"ro"
:
true
},
"guidance4-1.png"
:
{
"x"
:
1628
,
"y"
:
1096
,
"w"
:
175
,
"h"
:
48
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
175
,
"sh"
:
48
,
"ro"
:
false
},
"guidance4-2.png"
:
{
"x"
:
1628
,
"y"
:
1146
,
"w"
:
167
,
"h"
:
86
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
167
,
"sh"
:
86
,
"ro"
:
false
},
"boomScore.png"
:
{
"x"
:
1707
,
"y"
:
912
,
"w"
:
160
,
"h"
:
88
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
160
,
"sh"
:
88
,
"ro"
:
true
},
"extra-score.png"
:
{
"x"
:
1770
,
"y"
:
476
,
"w"
:
104
,
"h"
:
32
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
104
,
"sh"
:
32
,
"ro"
:
true
},
"guidance5-t.png"
:
{
"x"
:
1628
,
"y"
:
1234
,
"w"
:
100
,
"h"
:
53
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
100
,
"sh"
:
53
,
"ro"
:
false
},
"shortcut_icon.png"
:
{
"x"
:
1730
,
"y"
:
1234
,
"w"
:
89
,
"h"
:
48
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
89
,
"sh"
:
48
,
"ro"
:
true
}
}
},
},
{
{
"keys"
:
"guidance1-1.png,guidance1-2.png,guidance1-3.png,guidance2-1.png"
,
"keys"
:
"guidance1-1.png,guidance1-2.png,guidance1-3.png,guidance2-1.png"
,
"name"
:
"Guidance"
"name"
:
"Guidance"
,
"atlas"
:
{
"guidance1-2.png"
:
{
"x"
:
2
,
"y"
:
2
,
"w"
:
753
,
"h"
:
42
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
753
,
"sh"
:
42
,
"ro"
:
false
},
"guidance1-3.png"
:
{
"x"
:
2
,
"y"
:
46
,
"w"
:
576
,
"h"
:
45
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
576
,
"sh"
:
45
,
"ro"
:
false
},
"guidance1-1.png"
:
{
"x"
:
2
,
"y"
:
93
,
"w"
:
575
,
"h"
:
46
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
575
,
"sh"
:
46
,
"ro"
:
false
},
"guidance2-1.png"
:
{
"x"
:
2
,
"y"
:
141
,
"w"
:
537
,
"h"
:
45
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
537
,
"sh"
:
45
,
"ro"
:
false
}
}
},
},
{
{
"keys"
:
"_mooncake0-1.png,_mooncake0-2.png,_mooncake0.png,mooncake0-1.png,mooncake0-2.png,mooncake0.png,mooncake1-1.png,mooncake1-2.png,mooncake1.png,mooncake2-1.png,mooncake2-2.png,mooncake2.png,mooncake3-1.png,mooncake3-2.png,mooncake3.png,mooncake4-1.png,mooncake4-2.png,mooncake4.png"
,
"keys"
:
"_mooncake0-1.png,_mooncake0-2.png,_mooncake0.png,mooncake0-1.png,mooncake0-2.png,mooncake0.png,mooncake1-1.png,mooncake1-2.png,mooncake1.png,mooncake2-1.png,mooncake2-2.png,mooncake2.png,mooncake3-1.png,mooncake3-2.png,mooncake3.png,mooncake4-1.png,mooncake4-2.png,mooncake4.png"
,
"name"
:
"MoonCake"
"name"
:
"MoonCake"
,
"atlas"
:
{
"_mooncake0.png"
:
{
"x"
:
2
,
"y"
:
2
,
"w"
:
273
,
"h"
:
265
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
273
,
"sh"
:
265
,
"ro"
:
false
},
"_mooncake0-1.png"
:
{
"x"
:
2
,
"y"
:
269
,
"w"
:
217
,
"h"
:
237
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
217
,
"sh"
:
237
,
"ro"
:
true
},
"_mooncake0-2.png"
:
{
"x"
:
277
,
"y"
:
2
,
"w"
:
191
,
"h"
:
207
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
191
,
"sh"
:
207
,
"ro"
:
false
},
"mooncake4-1.png"
:
{
"x"
:
277
,
"y"
:
211
,
"w"
:
150
,
"h"
:
109
,
"ox"
:
14
,
"oy"
:
27
,
"sw"
:
170
,
"sh"
:
170
,
"ro"
:
false
},
"mooncake4.png"
:
{
"x"
:
241
,
"y"
:
322
,
"w"
:
142
,
"h"
:
116
,
"ox"
:
15
,
"oy"
:
27
,
"sw"
:
170
,
"sh"
:
170
,
"ro"
:
true
},
"mooncake0.png"
:
{
"x"
:
470
,
"y"
:
2
,
"w"
:
141
,
"h"
:
132
,
"ox"
:
14
,
"oy"
:
19
,
"sw"
:
170
,
"sh"
:
170
,
"ro"
:
true
},
"mooncake4-2.png"
:
{
"x"
:
470
,
"y"
:
145
,
"w"
:
140
,
"h"
:
111
,
"ox"
:
15
,
"oy"
:
32
,
"sw"
:
170
,
"sh"
:
170
,
"ro"
:
true
},
"mooncake3.png"
:
{
"x"
:
359
,
"y"
:
322
,
"w"
:
138
,
"h"
:
139
,
"ox"
:
13
,
"oy"
:
17
,
"sw"
:
170
,
"sh"
:
170
,
"ro"
:
false
},
"mooncake3-1.png"
:
{
"x"
:
2
,
"y"
:
488
,
"w"
:
137
,
"h"
:
123
,
"ox"
:
13
,
"oy"
:
13
,
"sw"
:
170
,
"sh"
:
170
,
"ro"
:
false
},
"mooncake0-1.png"
:
{
"x"
:
241
,
"y"
:
466
,
"w"
:
136
,
"h"
:
104
,
"ox"
:
17
,
"oy"
:
19
,
"sw"
:
170
,
"sh"
:
170
,
"ro"
:
true
},
"mooncake0-2.png"
:
{
"x"
:
499
,
"y"
:
287
,
"w"
:
123
,
"h"
:
103
,
"ox"
:
17
,
"oy"
:
48
,
"sw"
:
170
,
"sh"
:
170
,
"ro"
:
true
},
"mooncake3-2.png"
:
{
"x"
:
141
,
"y"
:
488
,
"w"
:
118
,
"h"
:
82
,
"ox"
:
31
,
"oy"
:
75
,
"sw"
:
170
,
"sh"
:
170
,
"ro"
:
true
},
"mooncake1.png"
:
{
"x"
:
499
,
"y"
:
412
,
"w"
:
86
,
"h"
:
86
,
"ox"
:
5
,
"oy"
:
4
,
"sw"
:
100
,
"sh"
:
100
,
"ro"
:
false
},
"mooncake2.png"
:
{
"x"
:
347
,
"y"
:
500
,
"w"
:
80
,
"h"
:
71
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
80
,
"sh"
:
71
,
"ro"
:
true
},
"mooncake1-2.png"
:
{
"x"
:
420
,
"y"
:
463
,
"w"
:
77
,
"h"
:
59
,
"ox"
:
12
,
"oy"
:
29
,
"sw"
:
100
,
"sh"
:
100
,
"ro"
:
false
},
"mooncake1-1.png"
:
{
"x"
:
420
,
"y"
:
524
,
"w"
:
75
,
"h"
:
60
,
"ox"
:
5
,
"oy"
:
4
,
"sw"
:
100
,
"sh"
:
100
,
"ro"
:
true
},
"mooncake2-1.png"
:
{
"x"
:
482
,
"y"
:
524
,
"w"
:
69
,
"h"
:
58
,
"ox"
:
0
,
"oy"
:
1
,
"sw"
:
80
,
"sh"
:
71
,
"ro"
:
true
},
"mooncake2-2.png"
:
{
"x"
:
542
,
"y"
:
500
,
"w"
:
67
,
"h"
:
53
,
"ox"
:
13
,
"oy"
:
17
,
"sw"
:
80
,
"sh"
:
71
,
"ro"
:
true
}
}
},
},
{
{
"keys"
:
"num0.png,num1.png,num2.png,num3.png,num4.png,num5.png,num6.png,num7.png,num8.png,num9.png,num_add.png"
,
"keys"
:
"num0.png,num1.png,num2.png,num3.png,num4.png,num5.png,num6.png,num7.png,num8.png,num9.png,num_add.png"
,
"name"
:
"NumberTexture"
"name"
:
"NumberTexture"
,
"atlas"
:
{
"num0.png"
:
{
"x"
:
2
,
"y"
:
2
,
"w"
:
62
,
"h"
:
90
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
62
,
"sh"
:
90
,
"ro"
:
false
},
"num2.png"
:
{
"x"
:
66
,
"y"
:
2
,
"w"
:
64
,
"h"
:
90
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
64
,
"sh"
:
90
,
"ro"
:
false
},
"num3.png"
:
{
"x"
:
2
,
"y"
:
94
,
"w"
:
63
,
"h"
:
90
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
63
,
"sh"
:
90
,
"ro"
:
true
},
"num6.png"
:
{
"x"
:
132
,
"y"
:
2
,
"w"
:
62
,
"h"
:
90
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
62
,
"sh"
:
90
,
"ro"
:
false
},
"num8.png"
:
{
"x"
:
94
,
"y"
:
94
,
"w"
:
62
,
"h"
:
90
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
62
,
"sh"
:
90
,
"ro"
:
true
},
"num9.png"
:
{
"x"
:
2
,
"y"
:
159
,
"w"
:
62
,
"h"
:
90
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
62
,
"sh"
:
90
,
"ro"
:
true
},
"num5.png"
:
{
"x"
:
196
,
"y"
:
2
,
"w"
:
64
,
"h"
:
89
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
64
,
"sh"
:
89
,
"ro"
:
false
},
"num1.png"
:
{
"x"
:
94
,
"y"
:
158
,
"w"
:
57
,
"h"
:
88
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
57
,
"sh"
:
88
,
"ro"
:
true
},
"num4.png"
:
{
"x"
:
186
,
"y"
:
94
,
"w"
:
67
,
"h"
:
88
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
67
,
"sh"
:
88
,
"ro"
:
false
},
"num7.png"
:
{
"x"
:
2
,
"y"
:
223
,
"w"
:
62
,
"h"
:
88
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
62
,
"sh"
:
88
,
"ro"
:
true
},
"num_add.png"
:
{
"x"
:
94
,
"y"
:
217
,
"w"
:
64
,
"h"
:
66
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
64
,
"sh"
:
66
,
"ro"
:
false
}
}
},
},
{
{
"keys"
:
"music_btn.png,music_btn_close.png,toastBg.png,waitingBg.png,waitingRot.png"
,
"keys"
:
"music_btn.png,music_btn_close.png,toastBg.png,waitingBg.png,waitingRot.png"
,
"name"
:
"common"
"name"
:
"common"
,
"atlas"
:
{
"toastBg.png"
:
{
"x"
:
2
,
"y"
:
2
,
"w"
:
460
,
"h"
:
130
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
460
,
"sh"
:
130
,
"ro"
:
false
},
"waitingBg.png"
:
{
"x"
:
2
,
"y"
:
134
,
"w"
:
160
,
"h"
:
180
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
160
,
"sh"
:
180
,
"ro"
:
true
},
"music_btn.png"
:
{
"x"
:
184
,
"y"
:
134
,
"w"
:
57
,
"h"
:
57
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
57
,
"sh"
:
57
,
"ro"
:
false
},
"music_btn_close.png"
:
{
"x"
:
184
,
"y"
:
193
,
"w"
:
57
,
"h"
:
57
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
57
,
"sh"
:
57
,
"ro"
:
false
},
"waitingRot.png"
:
{
"x"
:
243
,
"y"
:
134
,
"w"
:
56
,
"h"
:
56
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
56
,
"sh"
:
56
,
"ro"
:
false
}
}
},
},
{
{
"keys"
:
"hand_guidance.svga,hand_swing.svga,light.svga,pinkCake.svga,spBtnIcon.svga,spBtnIcon2.svga,spShow.svga"
,
"keys"
:
"hand_guidance.svga,hand_swing.svga,light.svga,pinkCake.svga,spBtnIcon.svga,spBtnIcon2.svga,spShow.svga"
,
"name"
:
"svga"
"name"
:
"svga"
}
}
],
],
"path"
:
"
.
/resource/"
"path"
:
"
https://yun.duiba.com.cn/db_games/activity/template/1631751982
/resource/"
}
}
\ No newline at end of file
src/SoundWeb.ts
View file @
f0a8bbb3
...
@@ -63,7 +63,9 @@ export function playSound(src: string, loop: boolean = false) {
...
@@ -63,7 +63,9 @@ export function playSound(src: string, loop: boolean = false) {
//循环的,且有缓存,取缓存的
//循环的,且有缓存,取缓存的
if
(
soundHash
[
src
]
&&
loop
)
sound
=
soundHash
[
src
]
if
(
soundHash
[
src
]
&&
loop
)
sound
=
soundHash
[
src
]
//没有就新建
//没有就新建
if
(
!
sound
)
sound
=
new
window
[
'Howl'
]({
src
:
[
src
],
autoplay
:
false
,
loop
});
if
(
!
sound
)
sound
=
new
window
[
'Howl'
]({
src
:
[
src
],
autoplay
:
false
,
loop
,
volume
:
src
===
Soundurl
.
moonCakeOut
?
0.6
:
1
});
//记录下,方便停止
//记录下,方便停止
soundHash
[
src
]
=
sound
;
soundHash
[
src
]
=
sound
;
//不循环删除缓存
//不循环删除缓存
...
...
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