Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
ngt10_tydh
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
ngt10_tydh
Commits
13654e20
Commit
13654e20
authored
2 years ago
by
yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11.15调整
parent
6224fdd3
master
v13
v12
v11
v10
v9
v8
v7
v6
v5
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1287 additions
and
405 deletions
+1287
-405
ngt10_tydh.fire
assets/ngt10_tydh/scene/ngt10_tydh.fire
+1259
-392
ngt10_tydh.ts
assets/ngt10_tydh/scene/ngt10_tydh.ts
+28
-13
No files found.
assets/ngt10_tydh/scene/ngt10_tydh.fire
View file @
13654e20
This diff is collapsed.
Click to expand it.
assets/ngt10_tydh/scene/ngt10_tydh.ts
View file @
13654e20
...
@@ -94,11 +94,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -94,11 +94,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
private
onAgain
()
{
private
onAgain
()
{
this
.
layout_finish
.
active
=
false
;
this
.
layout_finish
.
active
=
false
;
let
zjz_ske
=
cc
.
find
(
"
zjz_ske
"
,
this
.
node
);
zjz_ske
.
active
=
false
;
this
.
playLocalAudio
(
"
again
"
);
this
.
playLocalAudio
(
"
again
"
);
this
.
initData
();
this
.
initData
();
this
.
record_word
.
getComponent
(
cc
.
Label
).
string
=
""
;
this
.
record_word
.
getComponent
(
cc
.
Label
).
string
=
""
;
this
.
question_word
.
getComponent
(
cc
.
Label
).
string
=
""
;
this
.
question_word
.
getComponent
(
cc
.
Label
).
string
=
""
;
pg
.
event
.
emit
(
"
mouse_10_num
"
,
Game
.
getIns
().
total
);
pg
.
event
.
emit
(
"
mouse_10_num
"
,
Game
.
getIns
().
total
);
pg
.
event
.
emit
(
'
box2d_init
'
,
Game
.
getIns
().
getTotalPageNum
());
this
.
gameStart
();
this
.
gameStart
();
}
}
private
onNext
()
{
private
onNext
()
{
...
@@ -228,10 +231,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -228,10 +231,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
});
});
pg
.
event
.
emit
(
"
box2d_next
"
)
pg
.
event
.
emit
(
"
box2d_next
"
)
pg
.
event
.
emit
(
"
mouse_10_add
"
);
pg
.
event
.
emit
(
"
mouse_10_add
"
);
Game
.
getIns
().
player
.
addRight
();
}
else
{
}
else
{
this
.
playLocalAudio
(
"
error
"
).
then
(()
=>
{
this
.
playLocalAudio
(
"
error
"
).
then
(()
=>
{
pg
.
event
.
emit
(
"
mouse_10_add_error
"
);
pg
.
event
.
emit
(
"
mouse_10_add_error
"
);
})
})
Game
.
getIns
().
player
.
addError
();
}
}
}
}
...
@@ -257,19 +262,29 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -257,19 +262,29 @@ export default class SceneComponent extends MyCocosSceneComponent {
private
checkRoundEnd
()
{
private
checkRoundEnd
()
{
Game
.
getIns
().
addPage
();
Game
.
getIns
().
addPage
();
if
(
!
Game
.
getIns
().
getCurrentPage
())
{
if
(
!
Game
.
getIns
().
getCurrentPage
())
{
pg
.
event
.
on
(
"
box2d_roll_successed
"
,
()
=>
{
if
(
Game
.
getIns
().
player
.
right
>
0
)
{
pg
.
event
.
emit
(
"
box2d_hide
"
)
pg
.
event
.
on
(
"
box2d_roll_successed
"
,
()
=>
{
// this.gameOver();
pg
.
event
.
emit
(
"
box2d_hide
"
)
let
zjz_ske
=
cc
.
find
(
"
zjz_ske
"
,
this
.
node
);
// this.gameOver();
zjz_ske
.
active
=
true
;
let
zjz_ske
=
cc
.
find
(
"
zjz_ske
"
,
this
.
node
);
zjz_ske
.
getComponent
(
dragonBones
.
ArmatureDisplay
).
playAnimation
(
"
newAnimation
"
,
1
);
zjz_ske
.
active
=
true
;
zjz_ske
.
off
(
dragonBones
.
EventObject
.
COMPLETE
);
zjz_ske
.
getComponent
(
dragonBones
.
ArmatureDisplay
).
playAnimation
(
"
newAnimation
"
,
1
);
this
.
playLocalAudio
(
"
zhazhi
"
);
zjz_ske
.
off
(
dragonBones
.
EventObject
.
COMPLETE
);
zjz_ske
.
getComponent
(
dragonBones
.
ArmatureDisplay
).
on
(
dragonBones
.
EventObject
.
COMPLETE
,
()
=>
{
this
.
playLocalAudio
(
"
zhazhi
"
);
zjz_ske
.
active
=
false
;
zjz_ske
.
getComponent
(
dragonBones
.
ArmatureDisplay
).
on
(
dragonBones
.
EventObject
.
COMPLETE
,
()
=>
{
this
.
scheduleOnce
(()
=>
{
// zjz_ske.active = false;
this
.
showFind
();
},
1.5
);
},
this
);
})
}
else
{
this
.
scheduleOnce
(()
=>
{
// zjz_ske.active = false;
this
.
showFind
();
this
.
showFind
();
},
this
);
},
1.5
);
})
}
pg
.
event
.
emit
(
"
box2d_roll
"
)
pg
.
event
.
emit
(
"
box2d_roll
"
)
}
else
{
}
else
{
this
.
playLocalAudio
(
"
next
"
);
this
.
playLocalAudio
(
"
next
"
);
...
@@ -302,7 +317,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -302,7 +317,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
private
initStart
()
{
private
initStart
()
{
//生成橘子
//生成橘子
pg
.
event
.
emit
(
'
box2d_init
'
,
Game
.
getIns
().
getTotalPageNum
())
pg
.
event
.
emit
(
'
box2d_init
'
,
Game
.
getIns
().
getTotalPageNum
())
;
this
.
layout_start
.
active
=
true
;
this
.
layout_start
.
active
=
true
;
cc
.
find
(
"
layout_top/label_title
"
,
this
.
node
).
getComponent
(
cc
.
Label
).
string
=
Game
.
getIns
().
title
;
cc
.
find
(
"
layout_top/label_title
"
,
this
.
node
).
getComponent
(
cc
.
Label
).
string
=
Game
.
getIns
().
title
;
pg
.
event
.
emit
(
"
mouse_10_num
"
,
Game
.
getIns
().
total
);
pg
.
event
.
emit
(
"
mouse_10_num
"
,
Game
.
getIns
().
total
);
...
...
This diff is collapsed.
Click to expand it.
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