Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
op_09
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
op_09
Commits
d2330e49
Commit
d2330e49
authored
Dec 06, 2021
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 主动释放
parent
f7f058c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
op_09.js
play/assets/op_09/scene/op_09.js
+9
-1
No files found.
play/assets/op_09/scene/op_09.js
View file @
d2330e49
...
@@ -14,6 +14,13 @@ cc.Class({
...
@@ -14,6 +14,13 @@ cc.Class({
this
.
initSize
();
this
.
initSize
();
},
},
// 生命周期
onDestroy
()
{
if
(
this
.
timeA
){
clearTimeout
(
this
.
timeA
);
}
},
_imageResList
:
null
,
_imageResList
:
null
,
_audioResList
:
null
,
_audioResList
:
null
,
_animaResList
:
null
,
_animaResList
:
null
,
...
@@ -329,6 +336,7 @@ cc.Class({
...
@@ -329,6 +336,7 @@ cc.Class({
this
.
playEffect
(
'
jumpAll
'
);
this
.
playEffect
(
'
jumpAll
'
);
},
},
timeA
:
null
,
nextQuestion
()
{
nextQuestion
()
{
const
box
=
cc
.
find
(
'
Canvas/bg/box
'
);
const
box
=
cc
.
find
(
'
Canvas/bg/box
'
);
box
.
children
.
forEach
(
child
=>
{
box
.
children
.
forEach
(
child
=>
{
...
@@ -340,7 +348,7 @@ cc.Class({
...
@@ -340,7 +348,7 @@ cc.Class({
this
.
status
.
currentQuestionIdx
++
;
this
.
status
.
currentQuestionIdx
++
;
if
(
this
.
status
.
currentQuestionIdx
<
this
.
data
.
question_arr
.
length
)
{
if
(
this
.
status
.
currentQuestionIdx
<
this
.
data
.
question_arr
.
length
)
{
setTimeout
(()
=>
{
this
.
timeA
=
setTimeout
(()
=>
{
this
.
jumpToQuestion
(
this
.
status
.
currentQuestionIdx
);
this
.
jumpToQuestion
(
this
.
status
.
currentQuestionIdx
);
},
0.1
*
1000
);
},
0.1
*
1000
);
}
else
{
}
else
{
...
...
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