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
8510c2f9
Commit
8510c2f9
authored
Jul 10, 2023
by
yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b35ff84d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
17 deletions
+13
-17
hy05_pintu.ts
assets/hy05_pintu/scene/hy05_pintu.ts
+13
-17
No files found.
assets/hy05_pintu/scene/hy05_pintu.ts
View file @
8510c2f9
...
@@ -92,6 +92,11 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
...
@@ -92,6 +92,11 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
pg
.
event
.
on
(
'
npc_voice_play_voice_end
'
,
()
=>
{
pg
.
event
.
on
(
'
npc_voice_play_voice_end
'
,
()
=>
{
})
pg
.
event
.
on
(
'
layer_right_show_excellent_end
'
,
()
=>
{
this
.
coin
+=
3
;
pg
.
event
.
emit
(
'
layer_coin_show_coin
'
,
3
)
//1 2 3硬币数量
this
.
roundOver
=
false
;
})
})
pg
.
event
.
emit
(
'
npc_layer_back_init
'
,
this
.
data
)
pg
.
event
.
emit
(
'
npc_layer_back_init
'
,
this
.
data
)
...
@@ -100,7 +105,12 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
...
@@ -100,7 +105,12 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
this
.
replay
();
this
.
replay
();
})
})
pg
.
event
.
on
(
'
layer_coin_show_coin_end
'
,
()
=>
{
pg
.
event
.
on
(
'
layer_coin_show_coin_end
'
,
()
=>
{
let
over
=
GameJigsaw
.
getIns
().
addPage
();
if
(
!
over
){
this
.
gameOver
();
}
else
{
this
.
nextPage
();
this
.
nextPage
();
}
})
})
}
}
replay
()
{
replay
()
{
...
@@ -368,27 +378,13 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
...
@@ -368,27 +378,13 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
if
(
this
.
roundOver
)
return
;
if
(
this
.
roundOver
)
return
;
this
.
roundOver
=
true
;
this
.
roundOver
=
true
;
let
audio
=
GameJigsaw
.
getIns
().
getCurrentPage
().
audio
;
let
audio
=
GameJigsaw
.
getIns
().
getCurrentPage
().
audio
;
let
over
=
GameJigsaw
.
getIns
().
addPage
();
pg
.
audio
.
playAudioByUrl
(
audio
).
then
(
async
()
=>
{
pg
.
audio
.
playAudioByUrl
(
audio
).
then
(
async
()
=>
{
await
asyncDelay
(
1
);
await
asyncDelay
(
0.5
);
if
(
!
over
)
{
pg
.
event
.
emit
(
"
gameOver
"
);
}
else
{
pg
.
event
.
once
(
'
layer_right_show_excellent_end
'
,
()
=>
{
this
.
coin
+=
3
;
pg
.
event
.
emit
(
'
layer_coin_show_coin
'
,
this
.
coin
)
//1 2 3硬币数量
this
.
roundOver
=
false
;
})
pg
.
event
.
emit
(
"
layer_right_show_excellent
"
);
pg
.
event
.
emit
(
"
layer_right_show_excellent
"
);
}
});
});
}
}
gameOver
()
{
gameOver
()
{
pg
.
event
.
emit
(
'
layer_ending_show
'
,
{
coin
:
this
.
coin
})
pg
.
event
.
emit
(
'
layer_ending_show
'
,
{
coin
:
this
.
coin
})
}
}
...
...
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