Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sn11_zmxz
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
sn11_zmxz
Commits
9f04ce0b
Commit
9f04ce0b
authored
Oct 30, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
清除setTimeout
parent
804ad5ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
16 deletions
+39
-16
sn11_zmxz.js
assets/sn11_zmxz/scene/sn11_zmxz.js
+6
-1
defaultData_sn11_zmxz.js
assets/sn11_zmxz/script/defaultData_sn11_zmxz.js
+33
-15
No files found.
assets/sn11_zmxz/scene/sn11_zmxz.js
View file @
9f04ce0b
...
@@ -184,6 +184,9 @@ cc.Class({
...
@@ -184,6 +184,9 @@ cc.Class({
console
.
log
(
'
showGameOver
'
);
console
.
log
(
'
showGameOver
'
);
// this.moveGrassInterval
// this.moveGrassInterval
clearInterval
(
this
.
moveGrassInterval
);
clearInterval
(
this
.
moveGrassInterval
);
this
.
timeoutsIds
.
forEach
(
id
=>
{
clearTimeout
(
id
)
})
cc
.
director
.
loadScene
(
'
sn11_zmxz_end
'
);
cc
.
director
.
loadScene
(
'
sn11_zmxz_end
'
);
},
},
...
@@ -408,6 +411,7 @@ cc.Class({
...
@@ -408,6 +411,7 @@ cc.Class({
imgCharactor
.
scale
=
1
;
imgCharactor
.
scale
=
1
;
},
},
timeoutsIds
:
[],
showOptions
()
{
showOptions
()
{
const
nodeOptions
=
cc
.
find
(
'
Canvas/NodeOptions
'
);
const
nodeOptions
=
cc
.
find
(
'
Canvas/NodeOptions
'
);
nodeOptions
.
zIndex
=
10
;
nodeOptions
.
zIndex
=
10
;
...
@@ -425,6 +429,7 @@ cc.Class({
...
@@ -425,6 +429,7 @@ cc.Class({
nodeOption
.
scale
=
1
;
nodeOption
.
scale
=
1
;
const
btnOption
=
cc
.
find
(
`Canvas/NodeOptions/NodeOption_
${
i
}
/BtnOption`
)
const
btnOption
=
cc
.
find
(
`Canvas/NodeOptions/NodeOption_
${
i
}
/BtnOption`
)
this
.
timeoutsIds
.
push
(
setTimeout
(()
=>
{
setTimeout
(()
=>
{
cc
.
tween
(
btnOption
)
cc
.
tween
(
btnOption
)
.
by
(
2.5
,
{
y
:
20
},
{
easing
:
'
cubicInOut
'
})
.
by
(
2.5
,
{
y
:
20
},
{
easing
:
'
cubicInOut
'
})
...
@@ -432,7 +437,7 @@ cc.Class({
...
@@ -432,7 +437,7 @@ cc.Class({
.
union
()
.
union
()
.
repeatForever
()
.
repeatForever
()
.
start
();
.
start
();
},
Math
.
random
()
*
2000
);
},
Math
.
random
()
*
2000
)
)
;
const
label
=
cc
.
find
(
`Canvas/NodeOptions/NodeOption_
${
i
}
/BtnOption/LabelOption`
)
const
label
=
cc
.
find
(
`Canvas/NodeOptions/NodeOption_
${
i
}
/BtnOption/LabelOption`
)
label
.
getComponent
(
cc
.
Label
).
string
=
wordList
[
i
];
label
.
getComponent
(
cc
.
Label
).
string
=
wordList
[
i
];
...
...
assets/sn11_zmxz/script/defaultData_sn11_zmxz.js
View file @
9f04ce0b
module
.
exports
=
{
module
.
exports
=
{
roundList
:
[{
"
bgAudio
"
:
true
,
audio
:
'
ball
'
,
"
roundList
"
:
[
questionList
:
[{
{
rightAudio
:
'
b
'
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/ec19a2c73ec4fca0bf0458c74381a702.mp3
"
,
rightWord
:
'
b
'
,
"
questionList
"
:
[
wrongWordList
:
[
'
p
'
,
'
d
'
],
{
wrongAudioList
:
[
'
p.mp3
'
,
'
d.mp3
'
],
"
rightAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/b4673919e9942df87851ad70fae5d5ba.mp3
"
,
},
{
"
rightWord
"
:
"
j
"
,
rightAudio
:
'
a
'
,
"
wrongWordList
"
:
[
rightWord
:
'
all
'
,
"
r
"
,
wrongWordList
:
[
'
ao
'
,
'
arl
'
],
"
t
"
wrongAudioList
:
[
'
ao.mp3
'
,
'
arl.mp3
'
],
],
}]
"
wrongAudioList
"
:
[
}],
"
http://staging-teach.cdn.ireadabc.com/59a72e6ecfa057f8f6da2626a96d3669.mp3
"
,
}
"
http://staging-teach.cdn.ireadabc.com/163441a48b0325b021baddfa3cdc1f3d.mp3
"
]
},
{
"
rightAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/3a2459fbf41e71d847dbc1e1d8344174.mp3
"
,
"
rightWord
"
:
"
i
"
,
"
wrongWordList
"
:
[
"
c
"
,
"
o
"
],
"
wrongAudioList
"
:
[
"
http://staging-teach.cdn.ireadabc.com/46d0c82dfa618ae6e375dd6353cd7323.mp3
"
,
"
http://staging-teach.cdn.ireadabc.com/937fc595d0bd23321fc3559a97e0aa55.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