Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hy07_tiankong
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
hy07_tiankong
Commits
e2e480f0
Commit
e2e480f0
authored
Sep 08, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
301ecf41
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
hy07_tiankong.ts
assets/hy07_tiankong/scene/hy07_tiankong.ts
+11
-10
No files found.
assets/hy07_tiankong/scene/hy07_tiankong.ts
View file @
e2e480f0
...
@@ -132,12 +132,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -132,12 +132,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
let
over
=
Game
.
getIns
().
addPage
();
let
over
=
Game
.
getIns
().
addPage
();
if
(
!
over
)
{
if
(
!
over
)
{
// pg.event.emit('layer_ending_show', { coin: this.coin })
// pg.event.emit('layer_ending_show', { coin: this.coin })
const
midd
=
cc
.
find
(
'
middleLayer
'
);
this
.
sendData
(
this
.
coin
).
then
(()
=>
{
if
(
!
midd
)
return
this
.
log
(
"
no middleLayer
"
);
const
midd
=
cc
.
find
(
'
middleLayer
'
);
let
middleLayer
=
midd
.
getComponent
(
'
middleLayer
'
);
if
(
!
midd
)
return
this
.
log
(
"
no middleLayer
"
);
this
.
sendData
(
this
.
coin
)
let
middleLayer
=
midd
.
getComponent
(
'
middleLayer
'
);
middleLayer
.
saveGolds
(
this
.
coin
);
// 保存金币数量;num 是获得金币的数量,数字类型;
middleLayer
.
saveGolds
(
this
.
coin
);
// 保存金币数量;num 是获得金币的数量,数字类型;
middleLayer
.
goNextPage
();
// 跳转到下一页
middleLayer
.
goNextPage
();
// 跳转到下一页
})
}
else
{
}
else
{
this
.
gameStart
();
this
.
gameStart
();
}
}
...
@@ -153,10 +154,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -153,10 +154,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
sendData
(
score
)
{
sendData
(
score
)
{
return
new
Promise
(
res
=>
{
return
new
Promise
(
res
=>
{
let
upData
:
any
=
{
let
upData
:
any
=
{
word_count
:
this
.
data
.
word_count
,
word_count
:
this
.
data
.
word_count
||
0
,
sentence_count
:
this
.
data
.
sentence_count
,
sentence_count
:
this
.
data
.
sentence_count
||
0
,
zi_count
:
this
.
data
.
zi_count
,
zi_count
:
this
.
data
.
zi_count
||
0
,
score
:
score
,
score
:
score
||
0
,
};
};
let
recordList
=
pg
.
hw
.
getRecord
();
let
recordList
=
pg
.
hw
.
getRecord
();
if
(
recordList
&&
recordList
.
length
>
0
)
{
if
(
recordList
&&
recordList
.
length
>
0
)
{
...
...
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