Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hy08_caici
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
hy08_caici
Commits
2c8465b9
Commit
2c8465b9
authored
Jul 13, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
a6574ebd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
hy08_caici.ts
assets/hy08_caici/scene/hy08_caici.ts
+9
-1
No files found.
assets/hy08_caici/scene/hy08_caici.ts
View file @
2c8465b9
...
...
@@ -56,6 +56,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
protected
onDestroy
():
void
{
pg
.
event
.
clear
();
courseware
.
onConfigurationLandscape
()
// 下一页
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
const
middleLayerComponent
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
const
{
index
,
length
}
=
middleLayerComponent
.
getPageInfo
();
// 返回 length:有多少页; index: 当前第几页(从0开始)
if
(
index
==
length
-
1
)
{
middleLayerComponent
.
goNextCross
();
// 跳转到下一关卡
}
else
{
middleLayerComponent
.
goNextPage
();
// 跳转到下一页
}
}
onClose
()
{
this
.
onDestroy
();
...
...
@@ -115,7 +124,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
showAni
().
then
(
coin
=>
{
pg
.
event
.
once
(
'
layer_coin_show_coin_end
'
,
()
=>
{
this
.
onClose
();
pg
.
event
.
emit
(
'
layer_ending_show
'
)
})
// 动画回调
pg
.
event
.
emit
(
'
layer_coin_show_coin
'
,
coin
)
//1 2 3硬币数量
})
...
...
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