Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
l3_boardgame2_hole
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
l3_boardgame2_hole
Commits
49a5e104
Commit
49a5e104
authored
Aug 20, 2022
by
yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
33b9d065
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
l3_boardgame2_hole.ts
assets/l3_boardgame2_hole/scene/l3_boardgame2_hole.ts
+5
-4
AI.ts
assets/l3_boardgame2_hole/script/AI.ts
+1
-1
No files found.
assets/l3_boardgame2_hole/scene/l3_boardgame2_hole.ts
View file @
49a5e104
...
...
@@ -949,8 +949,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
rightBlock
=
this
.
jumpBlock
(
parseInt
(
riData
.
jump
));
let
idx
=
parseInt
(
riData
.
jump
);
//this.getNextRightIdx();
await
this
.
pieceFindRightBlock
(
rightBlock
,
idx
);
this
.
updateProgress
(
idx
);
}
pieceRed
[
"
cantMove
"
]
=
true
;
pieceBlue
[
"
cantMove
"
]
=
true
;
this
.
_status
.
letter
=
""
;
...
...
@@ -962,8 +962,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
// console.log("this._status = " + JSON.stringify(this._status));
// this._status.Blue = this._status.BuleLast;
let
rightBlock
=
this
.
getCurrentBlock
();
const
riData
=
rightBlock
.
getComponent
(
"
BoardGame2_ItemData_hole
"
);
// console.log(rightBlock);
let
idx
=
this
.
getNextRightIdx
();
// let idx = this.getNextRightIdx();
let
idx
=
parseInt
(
riData
.
idx
);
//this.getNextRightIdx();
// console.log("targetIdx->" + idx);
const
pieceRed
=
cc
.
find
(
"
Canvas/bg/chessBoard/pieceRed
"
);
const
pieceBlue
=
cc
.
find
(
"
Canvas/bg/chessBoard/pieceBlue
"
);
...
...
@@ -971,7 +973,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
pieceBlue
[
"
cantMove
"
]
=
false
;
// await this.pieceFindRightBlock(rightBlock, idx);
const
riData
=
rightBlock
.
getComponent
(
"
BoardGame2_ItemData_hole
"
);
if
(
riData
.
jump
!=
""
)
{
rightBlock
=
this
.
jumpBlock
(
parseInt
(
riData
.
jump
));
idx
=
parseInt
(
riData
.
jump
);
//this.getNextRightIdx();
...
...
@@ -1185,7 +1186,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
"
tokenId
"
:
"
6144295408558b08dd000001
"
,
"
applicationId
"
:
"
154838659000009e
"
}
testData
.
result
.
overall
=
Math
.
random
()
*
100
;
//
testData.result.overall = Math.random() * 100;
if
(
this
.
recrodEnd
(
testData
))
{
this
.
playLocalAudio
(
"
正确
"
);
await
this
.
showVoiceGood
();
...
...
assets/l3_boardgame2_hole/script/AI.ts
View file @
49a5e104
...
...
@@ -50,7 +50,7 @@ export class AI {
await
asyncDelay
(
Math
.
random
()
*
1
+
10
);
const
idx
=
this
.
getNextRightIdx
();
if
(
Math
.
random
()
<
0.
75
)
{
if
(
Math
.
random
()
<
0.
9
)
{
this
.
networkHelper
.
sendFrame
({
type
:
"
right
"
,
idx
:
idx
,
...
...
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