Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
ns20_jsqj
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
ns20_jsqj
Commits
fbb7cb17
Commit
fbb7cb17
authored
Jan 05, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复代码异常
parent
7078c149
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
496 additions
and
352 deletions
+496
-352
ns20_jsqj.fire
assets/ns20_jsqj/scene/ns20_jsqj.fire
+487
-345
ns20_jsqj.ts
assets/ns20_jsqj/scene/ns20_jsqj.ts
+9
-7
No files found.
assets/ns20_jsqj/scene/ns20_jsqj.fire
View file @
fbb7cb17
This diff is collapsed.
Click to expand it.
assets/ns20_jsqj/scene/ns20_jsqj.ts
View file @
fbb7cb17
...
...
@@ -101,10 +101,12 @@ export default class NewClass extends MyCocosSceneComponent {
})
}
onTouchMusicOn
()
{
pg
.
view
.
visible
(
pg
.
view
.
find
(
this
,
'
btn_music/on
'
),
false
);
pg
.
view
.
visible
(
pg
.
view
.
find
(
this
,
'
btn_music/off
'
),
true
);
pg
.
audio
.
pauseBgm
();
}
onTouchMusicOff
()
{
pg
.
view
.
visible
(
pg
.
view
.
find
(
this
,
'
btn_music/on
'
),
true
);
pg
.
view
.
visible
(
pg
.
view
.
find
(
this
,
'
btn_music/off
'
),
false
);
pg
.
audio
.
resumeBgm
();
}
...
...
@@ -218,14 +220,14 @@ export default class NewClass extends MyCocosSceneComponent {
if
(
this
.
turnRobot
)
{
let
points
=
this
.
getMovePoints
(
this
.
robotPoint
,
runNum
);
console
.
log
(
points
);
this
.
chessRobot
.
getComponent
(
"
chess
"
).
run
(
points
).
then
(()
=>
{
this
.
chessRobot
.
getComponent
(
"
chess
_ns20_jsqj
"
).
run
(
points
).
then
(()
=>
{
this
.
robotPoint
+=
(
points
.
length
-
1
);
resolve
(
''
);
})
}
else
{
let
points
=
this
.
getMovePoints
(
this
.
playerPoint
,
runNum
);
console
.
log
(
points
);
this
.
chessPlayer
.
getComponent
(
"
chess
"
).
run
(
points
).
then
(()
=>
{
this
.
chessPlayer
.
getComponent
(
"
chess
_ns20_jsqj
"
).
run
(
points
).
then
(()
=>
{
this
.
playerPoint
+=
(
points
.
length
-
1
);
resolve
(
''
);
})
...
...
@@ -237,12 +239,12 @@ export default class NewClass extends MyCocosSceneComponent {
let
jumpCell
=
Game
.
getIns
().
getMap
()[
jumpId
-
1
];
let
points
=
[
cell
,
jumpCell
];
if
(
this
.
turnRobot
)
{
this
.
chessRobot
.
getComponent
(
"
chess
"
).
run
(
points
).
then
(()
=>
{
this
.
chessRobot
.
getComponent
(
"
chess
_ns20_jsqj
"
).
run
(
points
).
then
(()
=>
{
this
.
robotPoint
=
Number
(
jumpCell
.
id
)
-
1
;
resolve
(
''
);
})
}
else
{
this
.
chessPlayer
.
getComponent
(
"
chess
"
).
run
(
points
).
then
(()
=>
{
this
.
chessPlayer
.
getComponent
(
"
chess
_ns20_jsqj
"
).
run
(
points
).
then
(()
=>
{
this
.
playerPoint
=
Number
(
jumpCell
.
id
)
-
1
;
resolve
(
''
);
})
...
...
@@ -328,7 +330,7 @@ export default class NewClass extends MyCocosSceneComponent {
pg
.
audio
.
stopAudio
(
this
.
touziAudio
);
let
touzi_ani
=
pg
.
view
.
find
(
this
,
"
touzi_ani
"
);
let
icon
=
pg
.
view
.
find
(
touzi_ani
,
"
icon
"
);
let
touzi
=
icon
.
getComponent
(
"
touzi
"
);
let
touzi
=
icon
.
getComponent
(
"
touzi
_ns20_jsqj
"
);
let
hand
=
pg
.
view
.
find
(
touzi_ani
,
"
hand
"
);
let
btn_stop
=
pg
.
view
.
find
(
touzi_ani
,
"
btn_stop
"
);
pg
.
view
.
visible
(
btn_stop
,
false
);
...
...
@@ -356,7 +358,7 @@ export default class NewClass extends MyCocosSceneComponent {
this
.
log
(
"
test startTouzi
"
)
let
touzi_ani
=
pg
.
view
.
find
(
this
,
"
touzi_ani
"
);
let
icon
=
pg
.
view
.
find
(
touzi_ani
,
"
icon
"
);
let
touzi
=
icon
.
getComponent
(
"
touzi
"
);
let
touzi
=
icon
.
getComponent
(
"
touzi
_ns20_jsqj
"
);
let
hand
=
pg
.
view
.
find
(
touzi_ani
,
"
hand
"
);
let
btn_stop
=
pg
.
view
.
find
(
touzi_ani
,
"
btn_stop
"
);
pg
.
view
.
visible
(
touzi_ani
,
true
);
...
...
@@ -388,7 +390,7 @@ export default class NewClass extends MyCocosSceneComponent {
}
this
.
log
(
"
player:
"
+
JSON
.
stringify
({
player
,
robot
}));
onHomeworkFinish
({
player
,
robot
})
// let state = pg.view.find(this, "state");
// let bg_win = pg.view.find(state, "bg_win");
...
...
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