Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
NJ_game_select
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
NJ_game_select
Commits
8fba885b
Commit
8fba885b
authored
May 25, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 十秒检测
parent
63aeba11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
NJ_game_select.ts
assets/NJ_game_select/scene/NJ_game_select.ts
+4
-4
No files found.
assets/NJ_game_select/scene/NJ_game_select.ts
View file @
8fba885b
...
...
@@ -40,15 +40,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
const
progress
=
cc
.
find
(
'
Canvas/step1/pad/circle/progress
'
);
try
{
await
Promise
.
all
([
this
.
asyncCountDown
(
progress
,
3
),
this
.
asyncCountDown
(
progress
,
10
),
this
.
checkPage
()
]);
this
.
step
=
1
;
}
catch
(
error
)
{
// TODO
三
秒内没有检测到对应页码的后续处理; 先加个提示框然后重新检测
// TODO
十
秒内没有检测到对应页码的后续处理; 先加个提示框然后重新检测
this
.
showTips
(
"
未检测到对应页面
"
);
circle
.
active
=
false
;
progress
.
getComponent
(
cc
.
ProgressBar
).
progress
=
1
;
circle
.
active
=
false
;
await
this
.
startStep1
();
}
}
...
...
@@ -79,7 +79,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
// 定时三秒检测
const
timeout
=
new
Promise
((
resolve
,
reject
)
=>
{
setTimeout
(()
=>
reject
(
new
Error
(
'
checkpage timeout
'
)),
3
000
)
setTimeout
(()
=>
reject
(
new
Error
(
'
checkpage timeout
'
)),
10
000
)
});
const
pageId
=
this
.
data
.
pageArr
[
this
.
currentPageIdx
].
pageIdx
;
...
...
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