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
089e2235
Commit
089e2235
authored
Jul 15, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改结算和显示内容
parent
2c8465b9
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
552 additions
and
519 deletions
+552
-519
hy08_caici.fire
assets/hy08_caici/scene/hy08_caici.fire
+533
-503
hy08_caici.ts
assets/hy08_caici/scene/hy08_caici.ts
+15
-12
countdown1_hy08_caici.png.meta
...s/hy08_caici/textures/hy08/countdown1_hy08_caici.png.meta
+2
-2
countdown2_hy08_caici.png.meta
...s/hy08_caici/textures/hy08/countdown2_hy08_caici.png.meta
+2
-2
No files found.
assets/hy08_caici/scene/hy08_caici.fire
View file @
089e2235
This diff is collapsed.
Click to expand it.
assets/hy08_caici/scene/hy08_caici.ts
View file @
089e2235
...
...
@@ -57,14 +57,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
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
();
// 跳转到下一页
}
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
).
getComponent
(
'
middleLayer
'
);
middleLayer
.
saveGolds
(
this
.
score
);
// 保存金币数量;num 是获得金币的数量,数字类型;
middleLayer
.
goNextPage
();
// 跳转到下一页
// const { index, length } = middleLayerComponent.getPageInfo(); // 返回 length:有多少页; index: 当前第几页(从0开始)
// if (index == length - 1) {
// middleLayerComponent.goNextCross(); // 跳转到下一关卡
// } else {
// middleLayerComponent.goNextPage(); // 跳转到下一页
// }
}
onClose
()
{
this
.
onDestroy
();
...
...
@@ -119,9 +120,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
startQuestion
();
}
private
score
:
number
;
gameOver
()
{
this
.
state
=
State
.
Over
;
this
.
showAni
().
then
(
coin
=>
{
this
.
showAni
().
then
((
coin
:
number
)
=>
{
this
.
score
=
coin
;
pg
.
event
.
once
(
'
layer_coin_show_coin_end
'
,
()
=>
{
this
.
onClose
();
})
// 动画回调
...
...
@@ -171,10 +174,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
aniBottomEnter
().
then
(()
=>
{
pg
.
hw
.
playAudio
(
'
readyGo
'
,
false
,
()
=>
{
});
cc
.
tween
(
ready
).
to
(
1
,
{
y
:
-
50
}).
to
(
0.2
,
{
y
:
0
}).
delay
(
0.3
).
call
(()
=>
{
cc
.
tween
(
ready
).
to
(
1
,
{
y
:
-
50
}).
to
(
0.2
,
{
y
:
0
}).
to
(
0.3
,
{
opacity
:
0
}
).
call
(()
=>
{
ready
.
active
=
false
;
}).
start
();
cc
.
tween
(
go
).
delay
(
1.3
).
to
(
1
,
{
y
:
-
50
}).
to
(
0.2
,
{
y
:
0
}).
delay
(
0.
5
).
call
(()
=>
{
cc
.
tween
(
go
).
delay
(
1.3
).
to
(
1
,
{
y
:
-
50
}).
to
(
0.2
,
{
y
:
0
}).
delay
(
0.
2
).
to
(
0.3
,
{
opacity
:
0
}
).
call
(()
=>
{
go
.
active
=
false
;
resolve
(
''
);
}).
start
();
...
...
@@ -209,7 +212,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
right
=
0
this
.
gameStart
=
true
;
this
.
state
=
State
.
Recording
;
this
.
currentItemQuestion
=
this
.
createQuestionItem
(
cc
.
v2
(
0
,
5
0
));
this
.
currentItemQuestion
=
this
.
createQuestionItem
(
cc
.
v2
(
0
,
-
10
0
));
this
.
updateQuestion
(
this
.
currentItemQuestion
,
this
.
getCurrent
());
this
.
updateProgress
();
}
...
...
assets/hy08_caici/textures/hy08/countdown1_hy08_caici.png.meta
View file @
089e2235
...
...
@@ -28,8 +28,8 @@
"rawHeight": 238,
"borderTop": 0,
"borderBottom": 0,
"borderLeft":
0
,
"borderRight":
0
,
"borderLeft":
185
,
"borderRight":
56
,
"subMetas": {}
}
}
...
...
assets/hy08_caici/textures/hy08/countdown2_hy08_caici.png.meta
View file @
089e2235
...
...
@@ -28,8 +28,8 @@
"rawHeight": 238,
"borderTop": 0,
"borderBottom": 0,
"borderLeft":
0
,
"borderRight":
0
,
"borderLeft":
182
,
"borderRight":
61
,
"subMetas": {}
}
}
...
...
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