Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hy04_pinci
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
hy04_pinci
Commits
66300a50
Commit
66300a50
authored
Sep 08, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
61a84dd0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
hy04_pinci.ts
assets/hy04_pinci/scene/hy04_pinci.ts
+11
-10
No files found.
assets/hy04_pinci/scene/hy04_pinci.ts
View file @
66300a50
...
...
@@ -130,9 +130,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
sendData
(
score
)
{
return
new
Promise
(
res
=>
{
let
upData
:
any
=
{
word_count
:
this
.
data
.
word_count
,
sentence_count
:
this
.
data
.
sentence_count
,
zi_count
:
this
.
data
.
zi_count
,
word_count
:
this
.
data
.
word_count
||
0
,
sentence_count
:
this
.
data
.
sentence_count
||
0
,
zi_count
:
this
.
data
.
zi_count
||
0
,
score
:
score
,
};
let
recordList
=
pg
.
hw
.
getRecord
();
...
...
@@ -147,13 +147,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
})
}
gameOver
()
{
this
.
onDestroy
();
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
if
(
!
middleLayer
)
return
;
this
.
sendData
(
this
.
wordDataList
.
length
*
3
)
const
middleLayerComponent
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
middleLayerComponent
.
saveGolds
(
this
.
wordDataList
.
length
*
3
);
// 保存金币数量;num 是获得金币的数量,数字类型;
middleLayerComponent
.
goNextPage
();
// 跳转到下一页
this
.
sendData
(
this
.
wordDataList
.
length
*
3
).
then
(()
=>
{
this
.
onDestroy
();
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
if
(
!
middleLayer
)
return
;
const
middleLayerComponent
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
middleLayerComponent
.
saveGolds
(
this
.
wordDataList
.
length
*
3
);
// 保存金币数量;num 是获得金币的数量,数字类型;
middleLayerComponent
.
goNextPage
();
// 跳转到下一页
})
// pg.event.once('layer_ending_touch_replay', () => {
// this.replay();
// })
...
...
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