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
d0d4798a
Commit
d0d4798a
authored
May 26, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
fc1185ad
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 @
d0d4798a
...
@@ -33,8 +33,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -33,8 +33,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
async
startStep1
()
{
async
startStep1
()
{
await
this
.
asyncPlayAudioByUrl
(
this
.
data
.
pageArr
[
this
.
currentPageIdx
].
startAudio
);
await
this
.
asyncPlayAudioByUrl
(
this
.
data
.
pageArr
[
this
.
currentPageIdx
].
startAudio
);
await
asyncDelay
(
0.3
);
const
circulate
=
async
()
=>
{
const
circulate
=
async
()
=>
{
await
asyncDelay
(
0.3
);
const
circle
=
cc
.
find
(
'
Canvas/step1/pad/circle
'
);
const
circle
=
cc
.
find
(
'
Canvas/step1/pad/circle
'
);
circle
.
active
=
true
;
circle
.
active
=
true
;
const
progress
=
cc
.
find
(
'
Canvas/step1/pad/circle/progress
'
);
const
progress
=
cc
.
find
(
'
Canvas/step1/pad/circle/progress
'
);
...
@@ -42,12 +42,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -42,12 +42,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
bar
.
progress
=
1
;
bar
.
progress
=
1
;
try
{
try
{
await
Promise
.
race
([
await
Promise
.
race
([
this
.
asyncCountDown
(
progress
,
3
),
this
.
asyncCountDown
(
progress
,
10
),
this
.
checkPage
()
this
.
checkPage
()
]);
]);
this
.
step
=
1
;
this
.
step
=
1
;
}
catch
(
error
)
{
}
catch
(
error
)
{
this
.
showTips
(
`未检测到对应页面`
);
this
.
showTips
(
`未检测到对应页面`
);
bar
.
progress
=
1
;
circle
.
active
=
false
;
circle
.
active
=
false
;
await
circulate
();
await
circulate
();
}
}
...
@@ -88,7 +89,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -88,7 +89,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
window
[
"
courseware
"
].
closeOsmoFingerRead
();
window
[
"
courseware
"
].
closeOsmoFingerRead
();
}
}
reject
(
new
Error
(
'
checkpage timeout
'
));
reject
(
new
Error
(
'
checkpage timeout
'
));
},
28
00
)
},
100
00
)
});
});
const
pageId
=
this
.
data
.
pageArr
[
this
.
currentPageIdx
].
pageIdx
;
const
pageId
=
this
.
data
.
pageArr
[
this
.
currentPageIdx
].
pageIdx
;
const
check
=
new
Promise
<
void
>
((
resolve
,
reject
)
=>
{
const
check
=
new
Promise
<
void
>
((
resolve
,
reject
)
=>
{
...
@@ -131,7 +132,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -131,7 +132,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
const
pageId
=
this
.
data
.
pageArr
[
this
.
currentPageIdx
].
pageIdx
;
const
pageId
=
this
.
data
.
pageArr
[
this
.
currentPageIdx
].
pageIdx
;
return
new
Promise
<
void
>
((
resolve
,
reject
)
=>
{
return
new
Promise
<
void
>
((
resolve
,
reject
)
=>
{
window
[
"
air
"
].
osmoFingerReadCallback
=
(
result
)
=>
{
window
[
"
air
"
].
osmoFingerReadCallback
=
(
result
)
=>
{
this
.
showTips
(
"
===========
"
);
const
resultObj
=
JSON
.
parse
(
result
);
const
resultObj
=
JSON
.
parse
(
result
);
const
p
=
resultObj
.
finger_pos_in_page
;
const
p
=
resultObj
.
finger_pos_in_page
;
if
(
p
.
x
==
-
1
||
p
.
y
==
-
1
)
{
if
(
p
.
x
==
-
1
||
p
.
y
==
-
1
)
{
...
...
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