Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
Coloring_OL
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
Coloring_OL
Commits
64d953df
Commit
64d953df
authored
Sep 08, 2022
by
limingzhe
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://vcs.ireadabc.com/template/Coloring_OL
parents
6bd1454f
b225cc67
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
93 additions
and
35 deletions
+93
-35
.DS_Store
.DS_Store
+0
-0
Coloring_OL.js
assets/Coloring_OL/scene/Coloring_OL.js
+61
-3
defaultData.js
assets/Coloring_OL/script/defaultData.js
+32
-32
No files found.
.DS_Store
View file @
64d953df
No preview for this file type
assets/Coloring_OL/scene/Coloring_OL.js
View file @
64d953df
...
...
@@ -216,6 +216,8 @@ cc.Class({
this
.
_can_tap
=
false
;
cc
.
log
(
"
paint 点击
"
);
playDragonBoneAnimation
(
this
.
coolcat
,
'
wrong
'
,
-
1
);
// 答错提示音频
this
.
playAudioByUrl
(
this
.
data
.
wrongAudio
,()
=>
{
playDragonBoneAnimation
(
this
.
coolcat
,
'
normal
'
,
-
1
);
this
.
_can_tap
=
true
;
...
...
@@ -365,6 +367,54 @@ cc.Class({
},
preloadItem
()
{
if
(
this
.
data
.
startAudio
)
{
this
.
_audioResList
.
push
({
url
:
this
.
data
.
startAudio
});
}
if
(
this
.
data
.
waitAudio
)
{
this
.
_audioResList
.
push
({
url
:
this
.
data
.
waitAudio
});
}
if
(
this
.
data
.
finishAudio
)
{
this
.
_audioResList
.
push
({
url
:
this
.
data
.
finishAudio
});
}
if
(
this
.
data
.
finishWaitAudio
)
{
this
.
_audioResList
.
push
({
url
:
this
.
data
.
finishWaitAudio
});
}
if
(
this
.
data
.
rightAudio
)
{
this
.
_audioResList
.
push
({
url
:
this
.
data
.
rightAudio
});
}
if
(
this
.
data
.
wrongAudio
)
{
this
.
_audioResList
.
push
({
url
:
this
.
data
.
wrongAudio
});
}
if
(
this
.
data
.
smileAudio
)
{
this
.
_audioResList
.
push
({
url
:
this
.
data
.
smileAudio
});
}
if
(
this
.
data
.
smileAudio_1
)
{
this
.
_audioResList
.
push
({
url
:
this
.
data
.
smileAudio_1
});
}
if
(
this
.
data
.
smileAudio_2
)
{
this
.
_audioResList
.
push
({
url
:
this
.
data
.
smileAudio_2
});
}
if
(
this
.
data
.
smileAudio_3
)
{
this
.
_audioResList
.
push
({
url
:
this
.
data
.
smileAudio_3
});
}
if
(
this
.
data
.
smileAudio_4
)
{
this
.
_audioResList
.
push
({
url
:
this
.
data
.
smileAudio_4
});
}
if
(
this
.
data
.
smileAudio_5
)
{
this
.
_audioResList
.
push
({
url
:
this
.
data
.
smileAudio_5
});
}
if
(
this
.
data
.
smileAudio_6
)
{
this
.
_audioResList
.
push
({
url
:
this
.
data
.
smileAudio_6
});
}
if
(
this
.
data
.
bg
)
{
this
.
_imageResList
.
push
({
url
:
this
.
data
.
bg
});
}
for
(
let
i
=
0
;
i
<
this
.
data
.
images
.
length
;
i
++
)
{
this
.
_imageResList
.
push
({
url
:
this
.
data
.
images
[
i
].
img
});
}
this
.
preload
();
},
...
...
@@ -930,6 +980,7 @@ cc.Class({
addItemParticle
(
item
)
{
const
particle
=
this
.
getSprNode
(
'
star
'
);
popParticle
(
item
,
{
x
:
0
,
y
:
0
},
particle
,
0.8
);
// 涂色正确音效
this
.
playAudioByName
(
'
star
'
);
},
...
...
@@ -1227,6 +1278,7 @@ cc.Class({
playDragonBoneAnimation
(
this
.
coolcat
,
'
begin
'
,
-
1
);
// 提示看看其他小朋友的结果-点赞
this
.
playAudioByName
(
'
tip_result
'
,
()
=>
{
this
.
countDownStart
();
playDragonBoneAnimation
(
this
.
coolcat
,
'
normal
'
);
...
...
@@ -1317,7 +1369,9 @@ cc.Class({
console
.
log
(
'
send data:
'
,
JSON
.
stringify
(
data
));
playDragonBoneAnimation
(
this
.
coolcat
,
'
begin
'
,
-
1
);
this
.
playAudioByName
(
'
result_
'
+
id
,
()
=>
{
// 提示有几位小朋友给你点赞
this
.
playAudioByUrl
(
this
.
data
[
'
smileAudio_
'
+
id
],
()
=>
{
playDragonBoneAnimation
(
this
.
coolcat
,
'
normal
'
);
onHomeworkFinish
(
data
);
...
...
@@ -1687,7 +1741,9 @@ cc.Class({
this
.
_id_count
=
this
.
_ids
.
length
;
playDragonBoneAnimation
(
this
.
coolcat
,
'
begin
'
,
-
1
);
this
.
playAudioByName
(
'
demo
'
,
()
=>
{
// 播放开场声音
this
.
playAudioByUrl
(
this
.
data
.
startAudio
,
()
=>
{
this
.
initOnlinePart
();
playDragonBoneAnimation
(
this
.
coolcat
,
'
normal
'
);
this
.
_can_tap
=
true
;
...
...
@@ -1829,7 +1885,9 @@ cc.Class({
//correct
playDragonBoneAnimation
(
this
.
coolcat
,
'
right
'
,
-
1
);
this
.
playAudioByName
(
'
correct
'
,
()
=>
{
// 播放回答正确音频
this
.
playAudioByUrl
(
this
.
data
.
rightAudio
,
()
=>
{
playDragonBoneAnimation
(
this
.
coolcat
,
'
normal
'
);
console
.
log
(
'
~ this._can_tap = true;
'
)
...
...
assets/Coloring_OL/script/defaultData.js
View file @
64d953df
export
const
defaultData
=
{
"
startAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/18bf8207ddea222c9b82c68f2549dadc
.mp3
"
,
"
waitAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/46cba1330608d848239ec6a68bb4707e
.mp3
"
,
"
finishAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/b3260e3d6972cc59b345f573aaab4290
.mp3
"
,
"
finishWaitAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/46cba1330608d848239ec6a68bb4707e
.mp3
"
,
"
loadingAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/18bf8207ddea222c9b82c68f2549dadc
.mp3
"
,
"
smileAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/b2ffa5ce0d165364e49e6ca32a3ae3a
a.mp3
"
,
"
smileAudio_1
"
:
"
http://staging-teach.cdn.ireadabc.com/f563ba1f81675c1b5803d2ecd8e1712a
.mp3
"
,
"
smileAudio_2
"
:
"
http://staging-teach.cdn.ireadabc.com/f563ba1f81675c1b5803d2ecd8e1712a
.mp3
"
,
"
smileAudio_3
"
:
"
http://staging-teach.cdn.ireadabc.com/f563ba1f81675c1b5803d2ecd8e1712a
.mp3
"
,
"
smileAudio_4
"
:
"
http://staging-teach.cdn.ireadabc.com/f563ba1f81675c1b5803d2ecd8e1712a
.mp3
"
,
"
smileAudio_5
"
:
"
http://staging-teach.cdn.ireadabc.com/f563ba1f81675c1b5803d2ecd8e1712a
.mp3
"
,
"
smileAudio_6
"
:
"
http://staging-teach.cdn.ireadabc.com/f563ba1f81675c1b5803d2ecd8e1712a.mp3
"
,
"
rightAudio
"
:
"
http://staging-
teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
,
"
wrongAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/fca98e3ed3f1269c07de6aac67f9d2c2
.mp3
"
,
"
bg
"
:
"
http://staging-teach.cdn.ireadabc.com/90bd03bdc2437b51055ed0423bac9b4a
.png
"
,
"
startAudio
"
:
"
http://teach.cdn.ireadabc.com/ab051bff88a84042a735a89438fb52f3
.mp3
"
,
"
waitAudio
"
:
"
http://teach.cdn.ireadabc.com/ab051bff88a84042a735a89438fb52f3
.mp3
"
,
"
finishAudio
"
:
"
http://teach.cdn.ireadabc.com/0c75e02519ca30f6aa3eee0b0cf8df17
.mp3
"
,
"
finishWaitAudio
"
:
"
http://teach.cdn.ireadabc.com/b6080321883ed6e865e3a17597285f9b
.mp3
"
,
"
loadingAudio
"
:
"
http://teach.cdn.ireadabc.com/a08236747b45c16939874916e24d90c8
.mp3
"
,
"
smileAudio
"
:
"
http://teach.cdn.ireadabc.com/88526da8f742dd110f98212785c938f
a.mp3
"
,
"
smileAudio_1
"
:
"
http://teach.cdn.ireadabc.com/0953d187a60a1bcf388d1d6565f042b3
.mp3
"
,
"
smileAudio_2
"
:
"
http://teach.cdn.ireadabc.com/bf7b2b3c5783abfdfc6234533880fa0d
.mp3
"
,
"
smileAudio_3
"
:
"
http://teach.cdn.ireadabc.com/9e645657212ecba5996c1512e4979754
.mp3
"
,
"
smileAudio_4
"
:
"
http://teach.cdn.ireadabc.com/166e59ceec43df515f80aa431447c901
.mp3
"
,
"
smileAudio_5
"
:
"
http://teach.cdn.ireadabc.com/6d0b20f370e534f23bfb0272fa95b5c8
.mp3
"
,
"
smileAudio_6
"
:
"
"
,
"
rightAudio
"
:
"
http://
teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
,
"
wrongAudio
"
:
"
http://teach.cdn.ireadabc.com/1ebdd8267b0f9161f1b6b83a3b44fb4b
.mp3
"
,
"
bg
"
:
"
http://teach.cdn.ireadabc.com/589f865ee20144c83295c42c330a9437
.png
"
,
"
images
"
:
[
{
"
img
"
:
"
http://staging-teach.cdn.ireadabc.com/4cc0099a522ba36f0916b6aeb5c85a84
.png
"
"
img
"
:
"
http://teach.cdn.ireadabc.com/71dd062e8ac876361a80facc8de90dce
.png
"
},
{
"
img
"
:
"
http://staging-teach.cdn.ireadabc.com/5ef1b6241fbdb251848ec9ae3bc3773a
.png
"
"
img
"
:
"
http://teach.cdn.ireadabc.com/bf19928fa8dfad8a1c5e883f099f0184
.png
"
},
{
"
img
"
:
"
http://staging-teach.cdn.ireadabc.com/b8369480bf8db275d94c889d6155ab52
.png
"
"
img
"
:
"
http://teach.cdn.ireadabc.com/c95f715c0b478f34345d70cdb7dd9048
.png
"
},
{
"
img
"
:
"
http://staging-teach.cdn.ireadabc.com/3caca3cd7fff035545689e1b0d5cc724
.png
"
"
img
"
:
"
http://teach.cdn.ireadabc.com/333769a4ecd5829f705d07fca7889f65
.png
"
},
{
"
img
"
:
"
http://staging-teach.cdn.ireadabc.com/e6b058fa93f6d635afab2c3b853d3ac1
.png
"
"
img
"
:
"
http://teach.cdn.ireadabc.com/cd0dfd43918f4c68c101e93bab7a7caa
.png
"
}
]
}
...
...
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