Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hy_write_word
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
hy_write_word
Commits
bba82f49
Commit
bba82f49
authored
Sep 20, 2023
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
12da1267
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
86 additions
and
33 deletions
+86
-33
hy_write_word.js
assets/hy_write_word/scene/hy_write_word.js
+86
-33
No files found.
assets/hy_write_word/scene/hy_write_word.js
View file @
bba82f49
...
...
@@ -1278,23 +1278,7 @@ cc.Class({
}
}
console
.
log
(
"
in checkOnEndPoint
"
)
const
pos
=
cc
.
v2
(
shark
.
x
,
shark
.
y
);
const
letter
=
this
.
_status
.
currentLetter
;
const
penIdx
=
this
.
_status
.
_currentPenIdx
;
const
pointIdx
=
this
.
_status
.
_currentPointIdx
;
if
(
!
letterData
[
letter
][
penIdx
])
{
return
;
}
this
.
_status
.
_currentPointIdx
++
;
if
(
this
.
_status
.
_currentPointIdx
>=
letterData
[
letter
][
penIdx
].
length
-
1
)
{
this
.
changeCurDrawNode
();
...
...
@@ -1304,7 +1288,6 @@ cc.Class({
shark
.
lastPos
=
null
;
shark
.
startPos
=
null
;
// this.showFlower(shark);
if
(
this
.
_status
.
_currentPenIdx
<
letterData
[
letter
].
length
)
{
...
...
@@ -1314,26 +1297,74 @@ cc.Class({
playAudio
(
this
.
line_end_Clip
);
this
.
moveSharkBack
(
shark
);
}
else
{
this
.
oneLetterEnd
(
shark
);
}
this
.
curMoveLocation
=
null
;
return
;
this
.
updateCurrentPointIdx
(
shark
);
// console.log(" in checkOnEndPoint")
// const pos = cc.v2(shark.x, shark.y);
// const letter = this._status.currentLetter;
// const penIdx = this._status._currentPenIdx;
// const pointIdx = this._status._currentPointIdx;
this
.
_status
.
_currentPointIdx
=
0
;
this
.
moveSharkBack
(
shark
);
// if (!letterData[letter][penIdx]) {
// return;
// }
}
this
.
updateArrows
(
shark
);
// this._status._currentPointIdx++;
// if (this._status._currentPointIdx >= letterData[letter][penIdx].length - 1) {
// this.changeCurDrawNode();
// this._status._currentPointIdx = 0;
// this._status._currentPenIdx++;
// shark.lastPos = null;
// shark.startPos = null;
// // this.showFlower(shark);
// if (this._status._currentPenIdx < letterData[letter].length) {
// this.removeStar();
// this.createArrows();
// this.createStar();
// playAudio(this.line_end_Clip);
// } else {
// this.oneLetterEnd(shark);
// }
// this.curMoveLocation = null;
// this.updateCurrentPointIdx(shark);
// this._status._currentPointIdx = 0;
// this.moveSharkBack(shark);
// }
// this.updateArrows(shark);
...
...
@@ -1491,16 +1522,26 @@ cc.Class({
this
.
createStar
();
playAudio
(
this
.
line_end_Clip
);
this
.
curMoveLocation
=
null
;
}
else
{
// console.log('2222');
this
.
oneLetterEnd
(
shark
)
this
.
curMoveLocation
=
null
;
this
.
isCheckPlayMoveAudio
=
false
;
this
.
oldMoveLocaltion
=
false
;
shark
.
lastPos
=
null
;
shark
.
startPos
=
null
;
return
;
}
// this.updateCurrentGraph(true);
this
.
curMoveLocation
=
null
;
this
.
updateCurrentPointIdx
(
shark
);
...
...
@@ -1909,16 +1950,28 @@ cc.Class({
async
showGold
(
cb
)
{
let
showCount
=
0
;
// const goldDisTime = 260;
const
showGoldAudio
=
async
()
=>
{
await
asyncDelay
(
0.15
);
setTimeout
(()
=>
{
if
(
this
.
isDestroy
)
{
return
;
}
if
(
showCount
>=
3
)
{
return
;
}
if
(
this
.
letter_end_Clip
)
{
playAudio
(
this
.
letter_end_Clip
);
}
},
260
);
showCount
++
;
// setTimeout(() => {
showGoldAudio
();
// }, goldDisTime);
}
showGoldAudio
();
console
.
log
(
'
in showGold
'
)
...
...
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