Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
WL01
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
WL01
Commits
9a587c3b
Commit
9a587c3b
authored
Jul 19, 2021
by
linzhiguo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+ 替换声音
+ dizzy | laugh 声音逻辑
parent
c5b38590
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
256 additions
and
11 deletions
+256
-11
correct.mp3
play/assets/WL01/audios/correct.mp3
+0
-0
correct.mp3.meta
play/assets/WL01/audios/correct.mp3.meta
+2
-2
dizzy.mp3
play/assets/WL01/audios/dizzy.mp3
+0
-0
dizzy.mp3.meta
play/assets/WL01/audios/dizzy.mp3.meta
+7
-0
incorrect.mp3
play/assets/WL01/audios/incorrect.mp3
+0
-0
incorrect.wav
play/assets/WL01/audios/incorrect.wav
+0
-0
incorrect.wav.meta
play/assets/WL01/audios/incorrect.wav.meta
+7
-0
laugh.wav
play/assets/WL01/audios/laugh.wav
+0
-0
laugh.wav.meta
play/assets/WL01/audios/laugh.wav.meta
+7
-0
victory.mp3
play/assets/WL01/audios/victory.mp3
+0
-0
victory.mp3.meta
play/assets/WL01/audios/victory.mp3.meta
+2
-2
WL01.fire
play/assets/WL01/scene/WL01.fire
+171
-3
WL01.js
play/assets/WL01/scene/WL01.js
+31
-1
defaultData.js
play/assets/WL01/script/defaultData.js
+29
-3
No files found.
play/assets/WL01/audios/correct.mp3
View file @
9a587c3b
No preview for this file type
play/assets/WL01/audios/correct.mp3.meta
View file @
9a587c3b
{
{
"ver": "2.0.1",
"ver": "2.0.1",
"uuid": "
12c5ce05-d467-4159-b294-1a7e176fa47f
",
"uuid": "
333f0144-0c45-43dc-99c7-190370f383c7
",
"downloadMode": 0,
"downloadMode": 0,
"duration": 0.5
774
,
"duration": 0.5
2925
,
"subMetas": {}
"subMetas": {}
}
}
\ No newline at end of file
play/assets/WL01/audios/dizzy.mp3
0 → 100644
View file @
9a587c3b
File added
play/assets/WL01/audios/
incorrect
.mp3.meta
→
play/assets/WL01/audios/
dizzy
.mp3.meta
View file @
9a587c3b
{
{
"ver": "2.0.1",
"ver": "2.0.1",
"uuid": "
739e4493-58ce-461b-830c-c89693d0a9d9
",
"uuid": "
2e778a81-9229-427b-9a1c-72cbacd4b697
",
"downloadMode": 0,
"downloadMode": 0,
"duration":
1.802449
,
"duration":
0.711688
,
"subMetas": {}
"subMetas": {}
}
}
\ No newline at end of file
play/assets/WL01/audios/incorrect.mp3
deleted
100644 → 0
View file @
c5b38590
File deleted
play/assets/WL01/audios/incorrect.wav
0 → 100644
View file @
9a587c3b
File added
play/assets/WL01/audios/incorrect.wav.meta
0 → 100644
View file @
9a587c3b
{
"ver": "2.0.1",
"uuid": "f0ae7fac-6c6a-45a4-a4a4-92bc980fbccd",
"downloadMode": 0,
"duration": 0.066485,
"subMetas": {}
}
\ No newline at end of file
play/assets/WL01/audios/laugh.wav
0 → 100644
View file @
9a587c3b
File added
play/assets/WL01/audios/laugh.wav.meta
0 → 100644
View file @
9a587c3b
{
"ver": "2.0.1",
"uuid": "7b77784e-89a9-43fc-a398-1dbf726a58f5",
"downloadMode": 0,
"duration": 0.601995,
"subMetas": {}
}
\ No newline at end of file
play/assets/WL01/audios/victory.mp3
View file @
9a587c3b
No preview for this file type
play/assets/WL01/audios/victory.mp3.meta
View file @
9a587c3b
{
{
"ver": "2.0.1",
"ver": "2.0.1",
"uuid": "5
a475a7e-8f7a-4074-aaa8-6b6c7a9a4458
",
"uuid": "5
b834df8-23b6-4261-8bf1-8f4ad55a1f87
",
"downloadMode": 0,
"downloadMode": 0,
"duration":
3.787755
,
"duration":
2.298776
,
"subMetas": {}
"subMetas": {}
}
}
\ No newline at end of file
play/assets/WL01/scene/WL01.fire
View file @
9a587c3b
...
@@ -13436,6 +13436,12 @@
...
@@ -13436,6 +13436,12 @@
},
},
{
{
"__id__": 255
"__id__": 255
},
{
"__id__": 257
},
{
"__id__": 259
}
}
],
],
"_active": true,
"_active": true,
...
@@ -13559,7 +13565,7 @@
...
@@ -13559,7 +13565,7 @@
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
"__uuid__": "
12c5ce05-d467-4159-b294-1a7e176fa47f
"
"__uuid__": "
333f0144-0c45-43dc-99c7-190370f383c7
"
},
},
"_volume": 1,
"_volume": 1,
"_mute": false,
"_mute": false,
...
@@ -13640,7 +13646,7 @@
...
@@ -13640,7 +13646,7 @@
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
"__uuid__": "
739e4493-58ce-461b-830c-c89693d0a9d9
"
"__uuid__": "
f0ae7fac-6c6a-45a4-a4a4-92bc980fbccd
"
},
},
"_volume": 1,
"_volume": 1,
"_mute": false,
"_mute": false,
...
@@ -13802,7 +13808,7 @@
...
@@ -13802,7 +13808,7 @@
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
"__uuid__": "5
a475a7e-8f7a-4074-aaa8-6b6c7a9a4458
"
"__uuid__": "5
b834df8-23b6-4261-8bf1-8f4ad55a1f87
"
},
},
"_volume": 1,
"_volume": 1,
"_mute": false,
"_mute": false,
...
@@ -13811,5 +13817,167 @@
...
@@ -13811,5 +13817,167 @@
"playOnLoad": false,
"playOnLoad": false,
"preload": false,
"preload": false,
"_id": "42GzSK6OFIc5i+/l2D/16o"
"_id": "42GzSK6OFIc5i+/l2D/16o"
},
{
"__type__": "cc.Node",
"_name": "dizzy",
"_objFlags": 0,
"_parent": {
"__id__": 248
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 258
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "d4psfVHOhH6ZHl7wJbpbSa"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 257
},
"_enabled": true,
"_clip": {
"__uuid__": "2e778a81-9229-427b-9a1c-72cbacd4b697"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false,
"preload": false,
"_id": "59zYOuHEdJ8qrAlYwd9GAY"
},
{
"__type__": "cc.Node",
"_name": "laugh",
"_objFlags": 0,
"_parent": {
"__id__": 248
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 260
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "2e+jPAejZOUrP48kn5e1UM"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 259
},
"_enabled": true,
"_clip": {
"__uuid__": "7b77784e-89a9-43fc-a398-1dbf726a58f5"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false,
"preload": false,
"_id": "1d4PhMnNBCDaFKYmaJ2A0S"
}
}
]
]
\ No newline at end of file
play/assets/WL01/scene/WL01.js
View file @
9a587c3b
...
@@ -198,7 +198,15 @@ cc.Class({
...
@@ -198,7 +198,15 @@ cc.Class({
this
.
_hammer
.
x
=
pos
.
x
;
this
.
_hammer
.
x
=
pos
.
x
;
this
.
_hammer
.
y
=
pos
.
y
;
this
.
_hammer
.
y
=
pos
.
y
;
this
.
_touched
=
false
;
this
.
_touched
=
false
;
this
.
playAudioByName
(
'
correct
'
);
this
.
playAudioByName
(
'
correct
'
,
()
=>
{
});
cc
.
tween
(
item
)
.
delay
(
0.5
)
.
call
(()
=>
{
this
.
playAudioByName
(
'
dizzy
'
);
})
.
start
();
playDragonBoneAnimation
(
this
.
_hammer
.
children
[
0
],
'
normal
'
,
1
,
()
=>
{
playDragonBoneAnimation
(
this
.
_hammer
.
children
[
0
],
'
normal
'
,
1
,
()
=>
{
this
.
_hammer
.
y
=
-
1000
;
this
.
_hammer
.
y
=
-
1000
;
this
.
hitMouse
(
item
);
this
.
hitMouse
(
item
);
...
@@ -212,6 +220,7 @@ cc.Class({
...
@@ -212,6 +220,7 @@ cc.Class({
this
.
_hammer
.
x
=
pos
.
x
;
this
.
_hammer
.
x
=
pos
.
x
;
this
.
_hammer
.
y
=
pos
.
y
;
this
.
_hammer
.
y
=
pos
.
y
;
this
.
playAudioByName
(
'
incorrect
'
);
this
.
playAudioByName
(
'
incorrect
'
);
playDragonBoneAnimation
(
this
.
_hammer
.
children
[
0
],
'
normal
'
,
1
,
()
=>
{
playDragonBoneAnimation
(
this
.
_hammer
.
children
[
0
],
'
normal
'
,
1
,
()
=>
{
this
.
_hammer
.
y
=
-
1000
;
this
.
_hammer
.
y
=
-
1000
;
});
});
...
@@ -220,6 +229,16 @@ cc.Class({
...
@@ -220,6 +229,16 @@ cc.Class({
},
this
);
},
this
);
},
},
setLaughAni
(){
this
.
_laugh
=
cc
.
tween
(
this
.
title
.
node
)
.
delay
(
3
)
.
call
(()
=>
{
this
.
playAudioByName
(
'
laugh
'
);
this
.
setLaughAni
();
})
.
start
();
},
playGame
(){
playGame
(){
this
.
updateFlagArea
(()
=>
{
this
.
updateFlagArea
(()
=>
{
this
.
playAudioByName
(
'
time321
'
);
this
.
playAudioByName
(
'
time321
'
);
...
@@ -274,6 +293,7 @@ cc.Class({
...
@@ -274,6 +293,7 @@ cc.Class({
mouse
.
audio
=
info
.
audio_url
;
mouse
.
audio
=
info
.
audio_url
;
mouse
.
playAudio
();
mouse
.
playAudio
();
this
.
moveUp
(
mouse
.
node
,
()
=>
{
this
.
moveUp
(
mouse
.
node
,
()
=>
{
this
.
setLaughAni
();
this
.
_time_ani
=
cc
.
tween
(
this
.
node
)
this
.
_time_ani
=
cc
.
tween
(
this
.
node
)
.
delay
(
this
.
data
.
time
)
.
delay
(
this
.
data
.
time
)
.
call
(()
=>
{
.
call
(()
=>
{
...
@@ -312,6 +332,11 @@ cc.Class({
...
@@ -312,6 +332,11 @@ cc.Class({
this
.
_time_ani
.
stop
();
this
.
_time_ani
.
stop
();
this
.
_time_ani
=
null
;
this
.
_time_ani
=
null
;
}
}
if
(
this
.
_laugh
){
this
.
_laugh
.
stop
();
this
.
_laugh
=
null
;
}
let
mouse
=
node
.
getComponent
(
cc
.
js
.
getClassByName
(
'
Mouse
'
));
let
mouse
=
node
.
getComponent
(
cc
.
js
.
getClassByName
(
'
Mouse
'
));
mouse
.
hit
();
mouse
.
hit
();
...
@@ -343,6 +368,11 @@ cc.Class({
...
@@ -343,6 +368,11 @@ cc.Class({
},
},
tryFinished
(){
tryFinished
(){
if
(
this
.
_laugh
){
this
.
_laugh
.
stop
();
this
.
_laugh
=
null
;
}
this
.
_flag_index
++
;
this
.
_flag_index
++
;
if
(
this
.
_flag_index
>=
this
.
data
.
mouses
.
length
){
if
(
this
.
_flag_index
>=
this
.
data
.
mouses
.
length
){
//console.log("over");
//console.log("over");
...
...
play/assets/WL01/script/defaultData.js
View file @
9a587c3b
export
const
defaultData
=
export
const
defaultData
=
{
"
mouses
"
:[{
"
word
"
:
"
a
"
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/dd360bbbcf5817eea26ac5fa3341ef5d.mp3
"
},{
"
word
"
:
"
O
"
},{
"
word
"
:
"
u
"
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/f228f396d2007fc20ab07763ebeda22e.mp3
"
},{
"
word
"
:
"
i
"
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/43349451985083b94a58c6870b49f115.mp3
"
},{
"
word
"
:
"
E
"
},{
"
word
"
:
"
Y
"
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/a812f773f22fdb5fa0de04bc7979f6d7.mp3
"
}],
"
title
"
:
"
weioewowe
"
,
"
time
"
:
"
4
"
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/738ef124b1882d10b31d59fb2fbd7eb7.mp3
"
}
{
;
"
mouses
"
:
[
{
"
word
"
:
"
a
"
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/dd360bbbcf5817eea26ac5fa3341ef5d.mp3
"
},
{
"
word
"
:
"
O
"
},
{
"
word
"
:
"
u
"
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/f228f396d2007fc20ab07763ebeda22e.mp3
"
},
{
"
word
"
:
"
i
"
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/43349451985083b94a58c6870b49f115.mp3
"
},
{
"
word
"
:
"
E
"
},
{
"
word
"
:
"
Y
"
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/a812f773f22fdb5fa0de04bc7979f6d7.mp3
"
}
],
"
title
"
:
"
weioewowe
"
,
"
time
"
:
"
10
"
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/738ef124b1882d10b31d59fb2fbd7eb7.mp3
"
}
\ No newline at end of file
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