Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hy11_paopao
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
hy11_paopao
Commits
3a4a1234
Commit
3a4a1234
authored
Oct 08, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重复点击遮挡增加
parent
e1791029
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
241 additions
and
328 deletions
+241
-328
hy11_paopao.fire
assets/hy11_paopao/scene/hy11_paopao.fire
+230
-321
hy11_paopao.ts
assets/hy11_paopao/scene/hy11_paopao.ts
+11
-7
No files found.
assets/hy11_paopao/scene/hy11_paopao.fire
View file @
3a4a1234
This diff is collapsed.
Click to expand it.
assets/hy11_paopao/scene/hy11_paopao.ts
View file @
3a4a1234
...
...
@@ -64,6 +64,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg
.
view
.
touchOn
(
this
.
btn_megaphone
,
this
.
onTouchMegaphone
,
this
)
}
onTouchMegaphone
()
{
if
(
this
.
gameOverEnd
)
return
;
if
(
!
this
.
startCreate
)
return
;
//发音
cc
.
audioEngine
.
stopAllEffects
();
...
...
@@ -86,6 +87,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
sendData
(
score
)
{
return
new
Promise
(
res
=>
{
if
(
!
cc
.
find
(
'
middleLayer
'
))
return
;
let
upData
:
any
=
{
word_count
:
this
.
data
.
word_count
||
0
,
sentence_count
:
this
.
data
.
sentence_count
||
0
,
...
...
@@ -104,16 +106,16 @@ export default class SceneComponent extends MyCocosSceneComponent {
})
}
private
gameOverEnd
:
boolean
;
gameOver
()
{
// pg.event.once('layer_ending_touch_replay', () => {
// this.replay();
// })
// pg.event.emit('layer_ending_show', { coin: this.data.questions.length * 3 })
if
(
this
.
gameOverEnd
)
return
;
this
.
gameOverEnd
=
true
;
if
(
!
cc
.
find
(
'
middleLayer
'
))
return
;
this
.
sendData
(
this
.
data
.
questions
.
length
*
3
).
then
(()
=>
{
})
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
).
getComponent
(
'
middleLayer
'
);
middleLayer
.
saveGolds
(
this
.
data
.
questions
.
length
*
3
);
// 保存金币数量;num 是获得金币的数量,数字类型;
middleLayer
.
goNextPage
();
// 跳转到下一页
})
}
private
rightList
:
Array
<
any
>
;
private
createCount
:
number
;
...
...
@@ -201,6 +203,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 点击泡泡
private
touchForid
:
boolean
;
touchPaoPao
(
e
:
any
)
{
console
.
log
(
this
.
gameOverEnd
);
if
(
this
.
gameOverEnd
)
return
;
if
(
this
.
touchForid
)
return
;
this
.
touchForid
=
true
;
// 如果泡泡没有到指定位置不允许点击
...
...
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