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
117bcd50
Commit
117bcd50
authored
May 25, 2022
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: getData
parent
428c3602
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
NJ_game_select.ts
assets/NJ_game_select/scene/NJ_game_select.ts
+18
-1
No files found.
assets/NJ_game_select/scene/NJ_game_select.ts
View file @
117bcd50
...
@@ -46,7 +46,19 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -46,7 +46,19 @@ export default class SceneComponent extends MyCocosSceneComponent {
await
this
.
asyncPlayAudioByUrl
(
this
.
data
.
pageArr
[
this
.
currentPageIdx
].
hotZoneItemArr
[
this
.
currentPartIdx
].
audio_url
);
await
this
.
asyncPlayAudioByUrl
(
this
.
data
.
pageArr
[
this
.
currentPageIdx
].
hotZoneItemArr
[
this
.
currentPartIdx
].
audio_url
);
await
asyncDelay
(
0.3
);
await
asyncDelay
(
0.3
);
await
this
.
checkPart
();
await
this
.
checkPart
();
// jumpToCourseWare
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
if
(
middleLayer
)
{
const
middleLayerComponent
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
middleLayerComponent
.
setData
(
'
NJ_game_select
'
,
{
folderId
:
this
.
folderId
,
step
:
this
.
step
,
currentPageIdx
:
this
.
currentPageIdx
,
currentPartIdx
:
this
.
currentPartIdx
});
}
jumpToCourseWare
(
this
.
rows
[
this
.
currentPartIdx
].
id
);
}
}
async
checkPage
()
{
async
checkPage
()
{
...
@@ -57,6 +69,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -57,6 +69,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
folderId
:
any
;
rows
:
Array
<
any
>
;
rows
:
Array
<
any
>
;
step
=
0
;
step
=
0
;
currentPageIdx
=
0
;
currentPageIdx
=
0
;
...
@@ -67,7 +80,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -67,7 +80,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
if
(
middleLayer
)
{
if
(
middleLayer
)
{
const
middleLayerComponent
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
const
middleLayerComponent
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
const
tmpData
=
middleLayerComponent
.
getData
(
'
NJ_game_select
'
);
const
tmpData
=
middleLayerComponent
.
getData
(
'
NJ_game_select
'
);
this
.
currentPageIdx
=
tmpData
.
currentPageIdx
||
0
;
this
.
currentPartIdx
=
tmpData
.
currentPartIdx
||
0
;
this
.
step
=
tmpData
.
step
||
0
;
folderId
=
tmpData
.
folderId
;
folderId
=
tmpData
.
folderId
;
this
.
folderId
=
tmpData
.
folderId
;
}
}
console
.
log
(
'
folderId =
'
+
folderId
);
console
.
log
(
'
folderId =
'
+
folderId
);
...
...
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