Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cc_mz_write_02
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
cc_mz_write_02
Commits
905b305b
Commit
905b305b
authored
Nov 18, 2022
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
6cfce551
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
8 deletions
+59
-8
.DS_Store
.DS_Store
+0
-0
cc_mz_write_02.js
assets/cc_mz_write_02/scene/cc_mz_write_02.js
+59
-8
No files found.
.DS_Store
View file @
905b305b
No preview for this file type
assets/cc_mz_write_02/scene/cc_mz_write_02.js
View file @
905b305b
...
...
@@ -478,18 +478,53 @@ cc.Class({
console
.
log
(
'
in initView 2
'
);
// this.initQuestion();
// this.initOption();
// this.initBtn();
// this.initIcon();
// this.initMask();
this
.
showStartAudio
();
// this.setCurQuestion();
// this.setCurOption();
},
// this.initStar();
initFingerQuesData
()
{
const
fingerQuesArr
=
[];
const
fingerAnimaNodeArr
=
this
.
fingerAnimaNodeArr
;
for
(
let
i
=
0
;
i
<
fingerAnimaNodeArr
.
length
;
i
++
)
{
const
quesData
=
fingerAnimaNodeArr
[
i
].
data
;
fingerQuesArr
.
push
(
quesData
);
}
this
.
fingerQuesArr
=
randomSortByArr
(
fingerQuesArr
);
this
.
nextFingerQues
();
console
.
log
(
'
fingerQuesArr:
'
,
this
.
fingerQuesArr
);
},
showStartAudio
()
{
if
(
!
this
.
data
.
begin_audio_url
)
{
this
.
startAudioPlayend
();
return
;
}
playAudio
(
this
.
data
.
begin_audio_url
,
()
=>
{
this
.
startAudioPlayend
();
})
},
startAudioPlayend
()
{
this
.
isBeginAudioEnd
=
true
;
if
(
this
.
fingerRectArr
&&
this
.
fingerRectArr
.
length
>
0
)
{
this
.
checkShowFingerQues
();
}
},
checkShowFingerQues
()
{
if
(
this
.
curFingerQues
&&
this
.
isBeginAudioEnd
)
{
if
(
curFingerQues
.
audio_url
)
{
playAudio
(
curFingerQues
.
audio_url
);
}
}
},
initTestPointArr
()
{
...
...
@@ -1717,6 +1752,17 @@ cc.Class({
console
.
log
(
'
answerData:
'
,
answerData
);
this
.
showFingerAnswer
(
answerData
);
this
.
nextFingerQues
();
},
nextFingerQues
()
{
if
(
this
.
fingerQuesArr
.
length
>
0
)
{
this
.
curFingerQues
=
this
.
fingerQuesArr
.
pop
();
this
.
checkShowFingerQues
();
}
},
...
...
@@ -1763,6 +1809,9 @@ cc.Class({
if
(
answerData
[
key
]
&&
answerData
[
key
].
isFinish
)
{
console
.
log
(
'
~showFinger
'
)
this
.
showFinger
(
animaNode
);
// this.showLetter(animaNode);
}
else
{
...
...
@@ -5948,6 +5997,8 @@ cc.Class({
// this.data.bgItem.isShowDebugLine = true;
this
.
initHotZoneItem
();
this
.
initFingerQuesData
();
this
.
hzLoadEnd
=
true
;
this
.
checkStart
();
...
...
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