Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hy05_pintu
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
hy05_pintu
Commits
885f708a
Commit
885f708a
authored
Sep 08, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
c285f217
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
LayerRecord_hy05_pintu.ts
assets/hy05_pintu/common/script/LayerRecord_hy05_pintu.ts
+1
-0
hy05_pintu.ts
assets/hy05_pintu/scene/hy05_pintu.ts
+8
-7
No files found.
assets/hy05_pintu/common/script/LayerRecord_hy05_pintu.ts
View file @
885f708a
...
@@ -193,6 +193,7 @@ export default class LayerRecord extends cc.Component {
...
@@ -193,6 +193,7 @@ export default class LayerRecord extends cc.Component {
});
//结束录音
});
//结束录音
}
}
async
recrodEnd
(
data
)
{
async
recrodEnd
(
data
)
{
pg
.
hw
.
addRecord
(
data
)
this
.
recordAudio
=
data
.
audioUrl
;
this
.
recordAudio
=
data
.
audioUrl
;
this
.
showPlay
();
this
.
showPlay
();
let
score
=
data
.
result
.
overall
;
let
score
=
data
.
result
.
overall
;
...
...
assets/hy05_pintu/scene/hy05_pintu.ts
View file @
885f708a
...
@@ -387,9 +387,9 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
...
@@ -387,9 +387,9 @@ export default class PuzzleJigsaw 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
,
};
};
let
recordList
=
pg
.
hw
.
getRecord
();
let
recordList
=
pg
.
hw
.
getRecord
();
...
@@ -408,10 +408,11 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
...
@@ -408,10 +408,11 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
// pg.event.emit('layer_ending_show', { coin: this.coin })
// pg.event.emit('layer_ending_show', { coin: this.coin })
const
midd
=
cc
.
find
(
'
middleLayer
'
);
const
midd
=
cc
.
find
(
'
middleLayer
'
);
if
(
!
midd
)
return
this
.
log
(
"
no middleLayer
"
);
if
(
!
midd
)
return
this
.
log
(
"
no middleLayer
"
);
this
.
sendData
(
this
.
coin
)
;
this
.
sendData
(
this
.
coin
)
.
then
(()
=>
{
let
middleLayer
=
midd
.
getComponent
(
'
middleLayer
'
);
let
middleLayer
=
midd
.
getComponent
(
'
middleLayer
'
);
middleLayer
.
saveGolds
(
this
.
coin
);
// 保存金币数量;num 是获得金币的数量,数字类型;
middleLayer
.
saveGolds
(
this
.
coin
);
// 保存金币数量;num 是获得金币的数量,数字类型;
middleLayer
.
goNextPage
();
// 跳转到下一页
middleLayer
.
goNextPage
();
// 跳转到下一页
})
}
}
...
...
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