Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
comparetree
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
comparetree
Commits
9a52d056
Commit
9a52d056
authored
Jun 15, 2021
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理显示
parent
5d8be12b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
176 additions
and
220 deletions
+176
-220
data.js
play/assets/scene/scene/data.js
+46
-1
scene.fire
play/assets/scene/scene/scene.fire
+3
-3
scene.js
play/assets/scene/scene/scene.js
+127
-216
No files found.
play/assets/scene/scene/data.js
View file @
9a52d056
function
retData
()
{
function
retData
()
{
// let item = {"contentObj":{"picArr":[[[{"cardId":"","left":{"title":"boy1","pic_url":"http://staging-teach.cdn.ireadabc.com/1baedb0b31dc5503e65e114ce21940ab.jpeg","audio_url":"http://staging-teach.cdn.ireadabc.com/495324991838775e49e3ca6593d432c9.mp3","radioValue":"C"},"right":{"title":"food","pic_url":"http://staging-teach.cdn.ireadabc.com/38117778476574c7ef8b445cf24d6eb5.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/495324991838775e49e3ca6593d432c9.mp3","radioValue":"A"},"radioValue":"B"},{"cardId":"","left":{"title":"boy2","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/17cc0e2a383e4632147dc495a1397915.mp3","radioValue":"C"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/21373528a7f38575e871de1d8e5a9671.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/17cc0e2a383e4632147dc495a1397915.mp3","radioValue":"B"},"radioValue":"E"}],[{"cardId":"","left":{"title":"girl1","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/205722475ccaca6233b2f28e635405ca.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/5d099c38000b804241f7dc1286b17457.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/205722475ccaca6233b2f28e635405ca.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"girl2","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/0b6ef24f15c6d8ad7bf27cc913445ebf.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/0abab9a26d537ebf1835a2ed8430162e.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/0b6ef24f15c6d8ad7bf27cc913445ebf.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"girl3","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/b2c170f84b85dddf554b5c837d1d6e30.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/5f34d4100a6ecb187fd715c99e917fc8.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/b2c170f84b85dddf554b5c837d1d6e30.mp3","radioValue":"B"},"radioValue":"D"}]],[[{"cardId":"","left":{"title":"rabbit","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/a7bd7c4de71319db5b6b0b60f0957e21.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/fe229e6b32f385fb8fe5eb9ec5843c66.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/a7bd7c4de71319db5b6b0b60f0957e21.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"cat","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/6c8dcd159d4f05bc93838cc47d3895f4.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/9c5fa50efd7a004f24ea7fcbcf81080e.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/6c8dcd159d4f05bc93838cc47d3895f4.mp3","radioValue":"B"},"radioValue":"A"},{"cardId":"","left":{"title":"coffe","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/3d0fea61d5d97f3caf04a9b738a0291b.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/9d114554c4760ff35f1ff5479504a531.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/a7bd7c4de71319db5b6b0b60f0957e21.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"tea","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/448291140d0b780c0278a14bf49277cb.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/bf26f92e4f0557ad70ac27006855dae9.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/6c8dcd159d4f05bc93838cc47d3895f4.mp3","radioValue":"B"},"radioValue":"D"}]],[[{"cardId":"","left":{"title":"cool","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/0e67aa701df18cbb5581ffb81ffa7836.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/38117778476574c7ef8b445cf24d6eb5.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/4c0379bc0f3bd0722874b2e11fb35336.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"big eye","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/fe226bc303f03ea994cb9a93d1620284.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/21373528a7f38575e871de1d8e5a9671.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/b985b71cd2f3c2d31e45992e4ae69d7f.mp3","radioValue":"B"},"radioValue":"A"},{"cardId":"","left":{"title":"cute","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/84c7b82de1a09da792237a174ebe071b.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/5d099c38000b804241f7dc1286b17457.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/7c1d1540233b6d050eae8215679104a8.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"shuai","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/9e799e7e86cd50c6699ca0e859c8aa1f.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/338dbee896e1fa8869495c84c603c33f.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/9a6b3177ab53ba75bcf293df1065bb64.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"big m","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/495324991838775e49e3ca6593d432c9.mp3","radioValue":"C"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/0abab9a26d537ebf1835a2ed8430162e.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/17cc0e2a383e4632147dc495a1397915.mp3","radioValue":"B"},"radioValue":"E"}]]]}}
// let item = {"contentObj":{"picArr":[[[{"cardId":"","left":{"title":"boy1","pic_url":"http://staging-teach.cdn.ireadabc.com/1baedb0b31dc5503e65e114ce21940ab.jpeg","audio_url":"http://staging-teach.cdn.ireadabc.com/495324991838775e49e3ca6593d432c9.mp3","radioValue":"C"},"right":{"title":"food","pic_url":"http://staging-teach.cdn.ireadabc.com/38117778476574c7ef8b445cf24d6eb5.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/495324991838775e49e3ca6593d432c9.mp3","radioValue":"A"},"radioValue":"B"},{"cardId":"","left":{"title":"boy2","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/17cc0e2a383e4632147dc495a1397915.mp3","radioValue":"C"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/21373528a7f38575e871de1d8e5a9671.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/17cc0e2a383e4632147dc495a1397915.mp3","radioValue":"B"},"radioValue":"E"}],[{"cardId":"","left":{"title":"girl1","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/205722475ccaca6233b2f28e635405ca.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/5d099c38000b804241f7dc1286b17457.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/205722475ccaca6233b2f28e635405ca.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"girl2","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/0b6ef24f15c6d8ad7bf27cc913445ebf.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/0abab9a26d537ebf1835a2ed8430162e.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/0b6ef24f15c6d8ad7bf27cc913445ebf.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"girl3","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/b2c170f84b85dddf554b5c837d1d6e30.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/5f34d4100a6ecb187fd715c99e917fc8.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/b2c170f84b85dddf554b5c837d1d6e30.mp3","radioValue":"B"},"radioValue":"D"}]],[[{"cardId":"","left":{"title":"rabbit","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/a7bd7c4de71319db5b6b0b60f0957e21.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/fe229e6b32f385fb8fe5eb9ec5843c66.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/a7bd7c4de71319db5b6b0b60f0957e21.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"cat","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/6c8dcd159d4f05bc93838cc47d3895f4.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/9c5fa50efd7a004f24ea7fcbcf81080e.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/6c8dcd159d4f05bc93838cc47d3895f4.mp3","radioValue":"B"},"radioValue":"A"},{"cardId":"","left":{"title":"coffe","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/3d0fea61d5d97f3caf04a9b738a0291b.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/9d114554c4760ff35f1ff5479504a531.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/a7bd7c4de71319db5b6b0b60f0957e21.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"tea","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/448291140d0b780c0278a14bf49277cb.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/bf26f92e4f0557ad70ac27006855dae9.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/6c8dcd159d4f05bc93838cc47d3895f4.mp3","radioValue":"B"},"radioValue":"D"}]],[[{"cardId":"","left":{"title":"cool","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/0e67aa701df18cbb5581ffb81ffa7836.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/38117778476574c7ef8b445cf24d6eb5.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/4c0379bc0f3bd0722874b2e11fb35336.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"big eye","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/fe226bc303f03ea994cb9a93d1620284.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/21373528a7f38575e871de1d8e5a9671.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/b985b71cd2f3c2d31e45992e4ae69d7f.mp3","radioValue":"B"},"radioValue":"A"},{"cardId":"","left":{"title":"cute","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/84c7b82de1a09da792237a174ebe071b.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/5d099c38000b804241f7dc1286b17457.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/7c1d1540233b6d050eae8215679104a8.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"shuai","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/9e799e7e86cd50c6699ca0e859c8aa1f.mp3","radioValue":"A"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/338dbee896e1fa8869495c84c603c33f.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/9a6b3177ab53ba75bcf293df1065bb64.mp3","radioValue":"B"},"radioValue":"D"},{"cardId":"","left":{"title":"big m","pic_url":"","audio_url":"http://staging-teach.cdn.ireadabc.com/495324991838775e49e3ca6593d432c9.mp3","radioValue":"C"},"right":{"title":"","pic_url":"http://staging-teach.cdn.ireadabc.com/0abab9a26d537ebf1835a2ed8430162e.jpg","audio_url":"http://staging-teach.cdn.ireadabc.com/17cc0e2a383e4632147dc495a1397915.mp3","radioValue":"B"},"radioValue":"E"}]]]}}
let
item
=
{
"
contentObj
"
:
{
"
picArr
"
:
[{
"
title
"
:
"
title
"
,
"
child
"
:
[{
"
title
"
:
"
main
"
,
"
child
"
:
[{
"
title
"
:
"
sub1
"
,
"
child
"
:
[{
"
title
"
:
"
son11
"
,
"
child
"
:
[{
"
cardId
"
:
""
,
"
title
"
:
"
aa
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/88b1cd55a3e2ff70447331078c0e2941.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
bb
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/26524d3fa6a060d80664b40cfb6105f6.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
cc
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/0cd859af88f946a66313cc06e4628fd2.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
dd
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/021d3b3904cb6e675286ac8fcb60da2b.png
"
,
"
audio_url
"
:
""
}]
},
{
"
title
"
:
"
son12
"
,
"
child
"
:
[{
"
cardId
"
:
""
,
"
title
"
:
"
a2
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/1c897715153af629e0aa1bfbf54472a4.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
b2
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/756083716a8ab9f2b6b66331e659845d.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
c2
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/6c13e8f14b294ca866205633b9f44891.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
d2
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/b3f29929c06d1af57bb6eb08d3f5b0d0.png
"
,
"
audio_url
"
:
""
}]
},
{
"
title
"
:
"
son13
"
,
"
child
"
:
[{
"
cardId
"
:
""
,
"
title
"
:
"
a3
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/88b1cd55a3e2ff70447331078c0e2941.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
b3
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/26524d3fa6a060d80664b40cfb6105f6.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
c3
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/88b1cd55a3e2ff70447331078c0e2941.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
d3
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/26524d3fa6a060d80664b40cfb6105f6.png
"
,
"
audio_url
"
:
""
}]
}]
},
{
"
title
"
:
"
sub2
"
,
"
child
"
:
[{
"
title
"
:
"
son21
"
,
"
child
"
:
[{
"
cardId
"
:
""
,
"
title
"
:
"
q1
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/fde35aaec618529b0b2b6cb3a18d1f85.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
w1
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/0cd859af88f946a66313cc06e4628fd2.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
e1
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/021d3b3904cb6e675286ac8fcb60da2b.png
"
,
"
audio_url
"
:
""
}]
},
{
"
title
"
:
"
son22
"
,
"
child
"
:
[{
"
cardId
"
:
""
,
"
title
"
:
"
q2
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/756083716a8ab9f2b6b66331e659845d.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
q3
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/6e9fec092bc8d547be4ad9fd5e01acf1.png
"
,
"
audio_url
"
:
""
}]
},
{
"
title
"
:
"
son23
"
,
"
child
"
:
[{
"
cardId
"
:
""
,
"
title
"
:
"
q4
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/b0f3c1a415015b254692a5d536b5b3fa.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
w4
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/cfa80b631a57638fd27cdef0d5aa2c2d.png
"
,
"
audio_url
"
:
""
}]
}]
}]
}]
}]
}
}
let
item
=
{
"
contentObj
"
:
{
"
picArr
"
:
[
{
"
title
"
:
"
title
"
,
"
child
"
:
[
{
"
title
"
:
"
main
"
,
"
child
"
:
[
{
"
title
"
:
"
sub1
"
,
"
child
"
:
[
{
"
title
"
:
"
son11
"
,
"
child
"
:
[{
"
cardId
"
:
""
,
"
title
"
:
"
aa
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/88b1cd55a3e2ff70447331078c0e2941.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
bb
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/26524d3fa6a060d80664b40cfb6105f6.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
cc
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/0cd859af88f946a66313cc06e4628fd2.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
dd
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/021d3b3904cb6e675286ac8fcb60da2b.png
"
,
"
audio_url
"
:
""
}]
},
{
"
title
"
:
"
son12
"
,
"
child
"
:
[{
"
cardId
"
:
""
,
"
title
"
:
"
a2
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/1c897715153af629e0aa1bfbf54472a4.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
b2
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/756083716a8ab9f2b6b66331e659845d.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
c2
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/6c13e8f14b294ca866205633b9f44891.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
d2
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/b3f29929c06d1af57bb6eb08d3f5b0d0.png
"
,
"
audio_url
"
:
""
}]
},
{
"
title
"
:
"
son13
"
,
"
child
"
:
[{
"
cardId
"
:
""
,
"
title
"
:
"
a3
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/88b1cd55a3e2ff70447331078c0e2941.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
b3
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/26524d3fa6a060d80664b40cfb6105f6.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
c3
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/88b1cd55a3e2ff70447331078c0e2941.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
d3
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/26524d3fa6a060d80664b40cfb6105f6.png
"
,
"
audio_url
"
:
""
}]
}
]
},
{
"
title
"
:
"
sub2
"
,
"
child
"
:
[{
"
title
"
:
"
son21
"
,
"
child
"
:
[{
"
cardId
"
:
""
,
"
title
"
:
"
q1
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/fde35aaec618529b0b2b6cb3a18d1f85.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
w1
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/0cd859af88f946a66313cc06e4628fd2.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
e1
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/021d3b3904cb6e675286ac8fcb60da2b.png
"
,
"
audio_url
"
:
""
}]
},
{
"
title
"
:
"
son22
"
,
"
child
"
:
[{
"
cardId
"
:
""
,
"
title
"
:
"
q2
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/756083716a8ab9f2b6b66331e659845d.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
q3
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/6e9fec092bc8d547be4ad9fd5e01acf1.png
"
,
"
audio_url
"
:
""
}]
},
{
"
title
"
:
"
son23
"
,
"
child
"
:
[{
"
cardId
"
:
""
,
"
title
"
:
"
q4
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/b0f3c1a415015b254692a5d536b5b3fa.png
"
,
"
audio_url
"
:
""
},
{
"
cardId
"
:
""
,
"
title
"
:
"
w4
"
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/cfa80b631a57638fd27cdef0d5aa2c2d.png
"
,
"
audio_url
"
:
""
}]
}
]
}]
}]
}]
}
}
return
item
;
return
item
;
}
}
export
const
itemData
=
retData
();
export
const
itemData
=
retData
();
\ No newline at end of file
play/assets/scene/scene/scene.fire
View file @
9a52d056
...
@@ -3330,7 +3330,7 @@
...
@@ -3330,7 +3330,7 @@
"__id__": 72
"__id__": 72
}
}
],
],
"_active":
tru
e,
"_active":
fals
e,
"_components": [],
"_components": [],
"_prefab": null,
"_prefab": null,
"_opacity": 255,
"_opacity": 255,
...
@@ -5284,8 +5284,8 @@
...
@@ -5284,8 +5284,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width": 1
08.65871372436897
,
"width": 1
28
,
"height": 12
6.53002406654821
"height": 12
8.32128078297362
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
...
play/assets/scene/scene/scene.js
View file @
9a52d056
...
@@ -203,7 +203,23 @@ cc.Class({
...
@@ -203,7 +203,23 @@ cc.Class({
let
list1
=
this
.
_zhuClass
.
child
[
0
];
let
list1
=
this
.
_zhuClass
.
child
[
0
];
let
list2
=
this
.
_zhuClass
.
child
[
1
];
let
list2
=
this
.
_zhuClass
.
child
[
1
];
let
list
=
list1
.
child
.
concat
(
list2
.
child
);
let
list
=
list1
.
child
.
concat
(
list2
.
child
);
let
arr
=
[];
let
arr1
=
[];
let
arr2
=
[];
if
(
list1
.
child
.
length
>
0
)
{
arr1
.
push
(
1
);
arr1
.
push
(
0
);
arr1
.
push
(
2
);
arr1
.
length
=
list1
.
child
.
length
;
}
if
(
list2
.
child
.
length
>
0
)
{
arr2
.
push
(
4
);
arr2
.
push
(
5
);
arr2
.
push
(
3
);
arr2
.
length
=
list2
.
child
.
length
;
}
arr
=
arr1
.
concat
(
arr2
);
arr
.
sort
();
let
x
=
-
480
;
//-291.057
let
x
=
-
480
;
//-291.057
let
addX
=
190
;
let
addX
=
190
;
...
@@ -212,7 +228,7 @@ cc.Class({
...
@@ -212,7 +228,7 @@ cc.Class({
let
data
=
list
[
i
];
let
data
=
list
[
i
];
let
itemClone
=
cc
.
instantiate
(
item
);
let
itemClone
=
cc
.
instantiate
(
item
);
itemClone
.
active
=
true
;
itemClone
.
active
=
true
;
let
posX
=
x
+
addX
*
i
;
let
posX
=
x
+
addX
*
arr
[
i
]
;
let
posY
=
y
;
let
posY
=
y
;
itemClone
.
x
=
posX
;
itemClone
.
x
=
posX
;
itemClone
.
y
=
posY
;
itemClone
.
y
=
posY
;
...
@@ -230,19 +246,45 @@ cc.Class({
...
@@ -230,19 +246,45 @@ cc.Class({
let
list2
=
this
.
_zhuClass
.
child
[
1
];
let
list2
=
this
.
_zhuClass
.
child
[
1
];
let
list
=
list1
.
child
.
concat
(
list2
.
child
);
let
list
=
list1
.
child
.
concat
(
list2
.
child
);
//0 1 00 11
//0 1 00 11
pg
.
view
.
visible
(
pg
.
view
.
find
(
parent
,
"
line2/line0
"
),
list
[
2
].
type
==
0
);
pg
.
view
.
visible
(
pg
.
view
.
find
(
parent
,
"
line2/line0
"
),
list
[
2
]
&&
list
[
2
].
type
==
0
);
pg
.
view
.
visible
(
pg
.
view
.
find
(
parent
,
"
line2/line1
"
),
list
[
2
].
type
==
1
);
pg
.
view
.
visible
(
pg
.
view
.
find
(
parent
,
"
line2/line1
"
),
list
[
2
]
&&
list
[
2
].
type
==
1
);
pg
.
view
.
visible
(
pg
.
view
.
find
(
parent
,
"
line3/line0
"
),
list
[
3
].
type
==
1
);
pg
.
view
.
visible
(
pg
.
view
.
find
(
parent
,
"
line3/line0
"
),
list
[
3
]
&&
list
[
3
].
type
==
1
);
pg
.
view
.
visible
(
pg
.
view
.
find
(
parent
,
"
line3/line1
"
),
list
[
3
].
type
==
0
);
pg
.
view
.
visible
(
pg
.
view
.
find
(
parent
,
"
line3/line1
"
),
list
[
3
]
&&
list
[
3
].
type
==
0
);
//line显示
pg
.
view
.
visible
(
pg
.
view
.
find
(
parent
,
"
line0
"
),
list1
.
child
.
length
>=
2
);
pg
.
view
.
visible
(
pg
.
view
.
find
(
parent
,
"
line1
"
),
list1
.
child
.
length
>=
1
);
pg
.
view
.
visible
(
pg
.
view
.
find
(
parent
,
"
line2
"
),
list1
.
child
.
length
>=
3
);
pg
.
view
.
visible
(
pg
.
view
.
find
(
parent
,
"
line3
"
),
list2
.
child
.
length
>=
3
);
pg
.
view
.
visible
(
pg
.
view
.
find
(
parent
,
"
line4
"
),
list2
.
child
.
length
>=
1
);
pg
.
view
.
visible
(
pg
.
view
.
find
(
parent
,
"
line5
"
),
list2
.
child
.
length
>=
2
);
},
},
initBox
()
{
initBox
()
{
this
.
_boxItems
=
[];
this
.
_boxItems
=
[];
//刷新子类
//刷新子类
let
son
=
pg
.
view
.
find
(
this
,
"
box/box_0
"
);
let
son
=
pg
.
view
.
find
(
this
,
"
box/box_0
"
);
let
box
=
pg
.
view
.
find
(
this
,
"
box
"
);
let
box
=
pg
.
view
.
find
(
this
,
"
box
"
);
let
fenlei1
=
this
.
_zhuClass
.
child
[
0
];
let
list1
=
this
.
_zhuClass
.
child
[
0
];
let
fenlei2
=
this
.
_zhuClass
.
child
[
1
];
let
list2
=
this
.
_zhuClass
.
child
[
1
];
let
sonleis
=
fenlei1
.
child
.
concat
(
fenlei2
.
child
);
let
sonleis
=
list1
.
child
.
concat
(
list2
.
child
);
let
arr
=
[];
let
arr1
=
[];
let
arr2
=
[];
if
(
list1
.
child
.
length
>
0
)
{
arr1
.
push
(
1
);
arr1
.
push
(
0
);
arr1
.
push
(
2
);
arr1
.
length
=
list1
.
child
.
length
;
}
if
(
list2
.
child
.
length
>
0
)
{
arr2
.
push
(
4
);
arr2
.
push
(
5
);
arr2
.
push
(
3
);
arr2
.
length
=
list2
.
child
.
length
;
}
arr
=
arr1
.
concat
(
arr2
);
arr
.
sort
();
let
x
=
-
480
;
//-290
let
x
=
-
480
;
//-290
let
addX
=
190
;
let
addX
=
190
;
let
y
=
-
62
;
let
y
=
-
62
;
...
@@ -251,7 +293,7 @@ cc.Class({
...
@@ -251,7 +293,7 @@ cc.Class({
let
data
=
sonleis
[
i
];
let
data
=
sonleis
[
i
];
sonClone
.
data
=
data
;
sonClone
.
data
=
data
;
sonClone
.
active
=
true
;
sonClone
.
active
=
true
;
let
posX
=
x
+
addX
*
i
;
let
posX
=
x
+
addX
*
arr
[
i
]
;
let
posY
=
y
;
let
posY
=
y
;
sonClone
.
x
=
posX
;
sonClone
.
x
=
posX
;
sonClone
.
y
=
posY
;
sonClone
.
y
=
posY
;
...
@@ -261,12 +303,14 @@ cc.Class({
...
@@ -261,12 +303,14 @@ cc.Class({
},
},
setSuccessItemPos
(
box
,
item
)
{
setSuccessItemPos
(
box
,
item
)
{
//判断当前item应该放在哪里
//判断当前item应该放在哪里
let
scale
=
item
.
scale
;
let
itemA
=
box
.
data
.
id
%
100
-
1
;
//坐标x
let
itemA
=
box
.
data
.
id
%
100
-
1
;
//坐标x
let
itemB
=
box
.
data
.
success
.
length
-
1
;
//坐标y
let
itemB
=
box
.
data
.
success
.
length
-
1
;
//坐标y
let
x
=
-
480
;
//-290
let
x
=
-
480
;
//-290
let
addX
=
190
;
let
addX
=
190
;
let
y
=
0
;
let
y
=
0
;
let
addY
=
-
40
;
// let addY = -40 * scale;
let
addY
=
-
43
*
scale
;
item
.
x
=
x
+
addX
*
itemA
;
item
.
x
=
x
+
addX
*
itemA
;
item
.
y
=
y
+
addY
*
itemB
;
item
.
y
=
y
+
addY
*
itemB
;
},
},
...
@@ -275,6 +319,7 @@ cc.Class({
...
@@ -275,6 +319,7 @@ cc.Class({
let
son
=
pg
.
view
.
find
(
this
,
"
items/item
"
);
let
son
=
pg
.
view
.
find
(
this
,
"
items/item
"
);
let
box
=
pg
.
view
.
find
(
this
,
"
items
"
);
let
box
=
pg
.
view
.
find
(
this
,
"
items
"
);
let
sonleis
=
GameManager
.
getIns
().
getCards
();
let
sonleis
=
GameManager
.
getIns
().
getCards
();
sonleis
.
length
=
10
;
if
(
sonleis
.
length
<=
14
)
{
if
(
sonleis
.
length
<=
14
)
{
let
x
=
-
500
;
let
x
=
-
500
;
let
addX
=
165
;
let
addX
=
165
;
...
@@ -294,13 +339,36 @@ cc.Class({
...
@@ -294,13 +339,36 @@ cc.Class({
this
.
updateItem
(
sonClone
);
this
.
updateItem
(
sonClone
);
box
.
addChild
(
sonClone
);
box
.
addChild
(
sonClone
);
}
}
}
else
if
(
sonleis
.
length
<=
20
)
{
let
scale
=
0.76
;
let
x
=
-
560
;
let
addX
=
165
*
scale
;
let
y
=
-
140
;
let
addY
=
-
110
*
scale
;
let
arr
=
[
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
19
,
20
,
21
,
22
,
23
,
24
,
25
,
26
,
27
,
28
,
29
,
30
];
for
(
let
i
=
0
;
i
<
sonleis
.
length
;
i
++
)
{
let
sonClone
=
cc
.
instantiate
(
son
);
let
data
=
sonleis
[
i
];
sonClone
.
data
=
data
;
sonClone
.
active
=
true
;
let
posX
=
x
+
addX
*
(
arr
[
i
]
%
10
);
let
posY
=
y
+
addY
*
Math
.
floor
(
arr
[
i
]
/
10
);
sonClone
.
x
=
posX
;
sonClone
.
y
=
posY
;
sonClone
.
scaleX
=
scale
;
sonClone
.
scaleY
=
scale
;
sonClone
.
cardState
=
0
;
this
.
initButton
(
sonClone
);
this
.
updateItem
(
sonClone
);
box
.
addChild
(
sonClone
);
}
}
else
{
}
else
{
let
scale
=
0.7
;
let
scale
=
0.7
;
let
x
=
-
500
;
let
x
=
-
500
;
let
addX
=
165
*
scale
;
let
addX
=
165
*
scale
;
let
y
=
-
200
;
let
y
=
-
200
;
let
addY
=
-
90
*
scale
;
let
addY
=
-
90
*
scale
;
let
arr
=
[
3
,
4
,
5
,
6
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
19
,
20
,
21
,
22
,
23
,
24
,
25
,
26
,
27
,
28
,
29
,
30
];
let
arr
=
[
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
19
,
20
,
21
,
22
,
23
,
24
,
25
,
26
,
27
,
28
,
29
,
30
,
5
,
6
,
3
,
4
];
for
(
let
i
=
0
;
i
<
sonleis
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
sonleis
.
length
;
i
++
)
{
let
sonClone
=
cc
.
instantiate
(
son
);
let
sonClone
=
cc
.
instantiate
(
son
);
let
data
=
sonleis
[
i
];
let
data
=
sonleis
[
i
];
...
@@ -388,6 +456,8 @@ cc.Class({
...
@@ -388,6 +456,8 @@ cc.Class({
item
.
on
(
cc
.
Node
.
EventType
.
TOUCH_CANCEL
,
this
.
onCancelItem
,
this
);
item
.
on
(
cc
.
Node
.
EventType
.
TOUCH_CANCEL
,
this
.
onCancelItem
,
this
);
},
},
onStartItem
(
touch
)
{
onStartItem
(
touch
)
{
if
(
!
this
.
_cantouch
)
return
;
this
.
_cantouch
=
false
;
let
item
=
touch
.
target
;
let
item
=
touch
.
target
;
if
(
item
.
moveState
==
2
)
return
;
if
(
item
.
moveState
==
2
)
return
;
//判断是否是在原地并没有到处移动
//判断是否是在原地并没有到处移动
...
@@ -397,8 +467,11 @@ cc.Class({
...
@@ -397,8 +467,11 @@ cc.Class({
//2.成功效果--
//2.成功效果--
//3.失败效果--
//3.失败效果--
onEndItem
(
touch
)
{
onEndItem
(
touch
)
{
// if (!this._cantouch) return;
// this._cantouch = false;
let
item
=
touch
.
target
;
let
item
=
touch
.
target
;
if
(
item
.
moveState
==
2
)
return
;
if
(
item
.
moveState
==
2
)
return
;
if
(
item
.
moveState
==
3
)
return
;
let
touchPos
=
touch
.
getLocation
();
let
touchPos
=
touch
.
getLocation
();
//判断是否是在原地并没有到处移动
//判断是否是在原地并没有到处移动
if
(
this
.
checkCollider
({
if
(
this
.
checkCollider
({
...
@@ -433,6 +506,10 @@ cc.Class({
...
@@ -433,6 +506,10 @@ cc.Class({
this
.
updateItem
(
item
);
this
.
updateItem
(
item
);
box
.
data
.
success
.
push
(
item
);
box
.
data
.
success
.
push
(
item
);
this
.
setSuccessItemPos
(
box
,
item
);
this
.
setSuccessItemPos
(
box
,
item
);
setTimeout
(()
=>
{
this
.
_cantouch
=
true
;
this
.
groupEnd
();
},
300
);
})
})
}
else
{
}
else
{
item
.
moveState
=
3
;
item
.
moveState
=
3
;
...
@@ -441,9 +518,11 @@ cc.Class({
...
@@ -441,9 +518,11 @@ cc.Class({
this
.
playSFX
(
"
audio_error
"
);
this
.
playSFX
(
"
audio_error
"
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
backItem
(
item
,
this
.
_startPos
);
this
.
backItem
(
item
,
this
.
_startPos
);
this
.
_cantouch
=
true
;
},
300
);
},
300
);
}
}
}
else
{
}
else
{
this
.
_cantouch
=
true
;
this
.
backItem
(
item
,
this
.
_startPos
);
this
.
backItem
(
item
,
this
.
_startPos
);
}
}
},
},
...
@@ -488,168 +567,14 @@ cc.Class({
...
@@ -488,168 +567,14 @@ cc.Class({
&&
item
.
y
>
box
.
y
-
box
.
height
/
2
&&
item
.
y
>
box
.
y
-
box
.
height
/
2
&&
item
.
y
<
box
.
y
+
box
.
height
/
2
;
&&
item
.
y
<
box
.
y
+
box
.
height
/
2
;
},
},
//大类 分类 小类 小类最多6个 小类child最多4个
//只有5个类的情况 左右各1类的情况 先砍中间 再砍两边
// 14 以上 2行 20以上3行
//表格生成的时候错误的提示。---
//空表格
// updateItem(item, data) {
// let img = pg.view.find(item, `img`);
// let txt = pg.view.find(item, `txt`);
// let audio = pg.view.find(item, `audio`);
// let box = pg.view.find(item, `box`);
// console.log(CardManager.TYPE_IMG);
// if (data.type == CardManager.TYPE_IMG) {
// pg.view.setNetImg(img, data.img);
// pg.view.visible(img, true);
// pg.view.visible(txt, false);
// pg.view.visible(audio, false);
// } else if (data.type == CardManager.TYPE_TXT) {
// pg.view.setString(txt, data.txt);
// pg.view.visible(img, false);
// pg.view.visible(txt, true);
// pg.view.visible(audio, false);
// } else if (data.type == CardManager.TYPE_MP3) {
// pg.view.visible(img, false);
// pg.view.visible(txt, false);
// pg.view.visible(audio, true);
// pg.view.visible(pg.view.find(item, `audio/btn_laba`), true);
// }
// item.scaleX = 1;
// item.scaleY = 1;
// pg.view.visible(box, false);
// item.attr({ data: data });
// pg.view.visible(item, true);
// pg.view.touchOn(item, this.onTouchItem, this);
// },
// onTouchItem(touch, info) {
// if (!this._cantouch) return;
// this._cantouch = false;
// let item = touch.target;
// let data = item.data;
// console.log(data);
// this._cardTouchItems.push(item);
// if (this._cardTouchItems.length == 2) {
// let item0 = this._cardTouchItems[0];
// let item1 = this._cardTouchItems[1];
// //检测重复点击 取消选中
// if (item0.data && item1.data && item0.data.cardId == item1.data.cardId) {
// pg.view.visible(pg.view.find(item, 'box'), false);
// this._cantouch = true;
// } else if (item0.data && item1.data && item0.data.cardDid == item1.data.cardDid) {
// //成功--变小 消失
// this._successItems.push(item0);
// this._successItems.push(item1);
// pg.view.visible(pg.view.find(item, 'box'), true);
// this.playSFX("audio_choice").then(() => {
// this.playAudioAni(item).then(() => {
// this.createRightAni(cc.v2(item0.x, item0.y));
// this.createRightAni(cc.v2(item1.x, item1.y));
// this.playSFX("audio_right").then(() => {
// this._cantouch = true;
// this.playAudioAni(item0).then(() => {
// this.playAudioAni(item1).then(() => {
// ani.scaleOut(item0);
// ani.scaleOut(item1).then(() => {
// setTimeout(() => {
// this.groupEnd();//判定单组结束
// }, 100);
// });
// pg.view.visible(pg.view.find(item0, 'box'), false);
// pg.view.visible(pg.view.find(item1, 'box'), false);
// });
// });
// });
// })
// });
// } else {
// //失败--抖动效果
// pg.view.visible(pg.view.find(item, 'box'), true);
// this.playSFX("audio_choice").then(() => {
// this.playAudioAni(item).then(() => {
// ani.shake(item0);
// ani.shake(item1);
// pg.view.visible(pg.view.find(item0, 'box'), false);
// pg.view.visible(pg.view.find(item1, 'box'), false);
// this.playSFX("audio_error").then(() => {
// this._cantouch = true;
// });
// });
// });
// }
// this._cardTouchItems.length = 0;
// } else if (this._cardTouchItems.length == 1) {
// //显示选中效果
// pg.view.visible(pg.view.find(item, 'box'), true);
// this.playSFX("audio_choice").then(() => {
// //audio 播放的时候动画播放, audio停的时候 动画正好能停下
// //如果动画停的位置不对,直接强制设置对应的效果
// //下一次播放没有问题即可
// this.playAudioAni(item).then(() => {
// this._cantouch = true;
// })
// });
// } else {
// //异常情况
// this._cardTouchItems.length = 0;
// this._cantouch = true;
// }
// },
playAudioAni
(
item
)
{
playAudioAni
(
item
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
var
anim
=
pg
.
view
.
find
(
item
,
`audio`
).
getComponent
(
cc
.
Animation
);
var
anim
=
pg
.
view
.
find
(
item
,
`audio`
).
getComponent
(
cc
.
Animation
);
...
@@ -672,33 +597,19 @@ cc.Class({
...
@@ -672,33 +597,19 @@ cc.Class({
},
},
//回合结束
//回合结束
groupEnd
()
{
groupEnd
()
{
if
(
this
.
_successItems
.
length
<
this
.
_cardPage
.
length
)
return
;
for
(
let
i
=
0
;
i
<
this
.
_boxItems
.
length
;
i
++
)
{
if
(
this
.
_gameCode
!=
0
)
return
;
let
box
=
this
.
_boxItems
[
i
];
let
code
=
CardManager
.
getIns
().
addPageNum
();
if
(
box
.
data
.
success
.
length
!=
box
.
data
.
child
.
length
)
return
;
if
(
code
==
0
)
{
this
.
_gameCode
=
0
;
this
.
initSingleData
();
this
.
initLayout
();
}
else
if
(
code
==
1
)
{
this
.
_gameCode
=
1
;
//播放星星动画 然后下一页
this
.
playSFX
(
"
audio_bigStar
"
);
this
.
createStarAni
().
then
(()
=>
{
this
.
_gameCode
=
0
;
this
.
initSingleData
();
this
.
initLayout
();
})
}
else
if
(
code
==
2
)
{
this
.
_gameCode
=
2
;
//播放星星动画 然后结束
this
.
playSFX
(
"
audio_bigStar
"
);
this
.
playSFX
(
"
audio_sahua
"
);
this
.
createStarAni
().
then
(()
=>
{
})
this
.
createFireworkAni
().
then
(()
=>
{
//gameOver
pg
.
view
.
visible
(
this
.
btn_replay
,
true
);
})
}
}
// if (this._successItems.length < this._cardPage.length) return;
if
(
this
.
_gameCode
!=
0
)
return
;
this
.
_gameCode
=
2
;
//播放星星动画 然后结束
this
.
playSFX
(
"
audio_sahua
"
);
this
.
createFireworkAni
().
then
(()
=>
{
//gameOver
// pg.view.visible(this.btn_replay, true);
})
},
},
createRightAni
(
pos
)
{
createRightAni
(
pos
)
{
let
right
=
pg
.
view
.
find
(
this
,
'
right
'
);
let
right
=
pg
.
view
.
find
(
this
,
'
right
'
);
...
@@ -720,25 +631,25 @@ cc.Class({
...
@@ -720,25 +631,25 @@ cc.Class({
},
},
createFireworkAni
()
{
createFireworkAni
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
//
this.showAllFirework(cc.find('Canvas/firework_ani'), cc.find('Canvas/paperBase').children);
this
.
showAllFirework
(
cc
.
find
(
'
Canvas/firework_ani
'
),
cc
.
find
(
'
Canvas/paperBase
'
).
children
);
showFireworks
(
//
showFireworks(
cc
.
find
(
'
Canvas/firework_ani
'
),
//
cc.find('Canvas/firework_ani'),
cc
.
find
(
'
Canvas/RibbonNodeBase
'
).
children
,
//
cc.find('Canvas/RibbonNodeBase').children,
cc
.
v2
(
0
,
-
400
),
cc
.
v2
(
0
,
1000
),
200
,
200
//
cc.v2(0, -400), cc.v2(0, 1000), 200, 200
);
//
);
showFireworks
(
//
showFireworks(
cc
.
find
(
'
Canvas/firework_ani
'
),
//
cc.find('Canvas/firework_ani'),
cc
.
find
(
'
Canvas/RibbonNodeBase
'
).
children
,
//
cc.find('Canvas/RibbonNodeBase').children,
cc
.
v2
(
-
600
,
-
400
),
cc
.
v2
(
200
,
1000
),
200
,
200
//
cc.v2(-600, -400), cc.v2(200, 1000), 200, 200
);
//
);
showFireworks
(
//
showFireworks(
cc
.
find
(
'
Canvas/firework_ani
'
),
//
cc.find('Canvas/firework_ani'),
cc
.
find
(
'
Canvas/RibbonNodeBase
'
).
children
,
//
cc.find('Canvas/RibbonNodeBase').children,
cc
.
v2
(
600
,
-
400
),
cc
.
v2
(
-
200
,
1000
),
200
,
200
//
cc.v2(600, -400), cc.v2(-200, 1000), 200, 200
);
//
);
setTimeout
(()
=>
{
//
setTimeout(() => {
resolve
(
''
);
//
resolve('');
},
1000
);
//
}, 1000);
});
});
},
},
playSFX
(
name
)
{
playSFX
(
name
)
{
...
...
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