Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
l2_boardgame2
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
l2_boardgame2
Commits
36bc1536
Commit
36bc1536
authored
Jul 20, 2022
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2人匹配bug修复
parent
4277b60f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
l2_boardgame2.ts
assets/l2_boardgame2/scene/l2_boardgame2.ts
+9
-8
Server.ts
assets/l2_boardgame2/script/Server.ts
+1
-1
No files found.
assets/l2_boardgame2/scene/l2_boardgame2.ts
View file @
36bc1536
...
...
@@ -105,15 +105,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
initView
()
{
this
.
addComponents
();
this
.
hideVoice
();
this
.
initBg
();
this
.
initLoadingLayer
();
this
.
initPiece
();
}
getJumpList
()
{
const
jumpList
=
[];
addComponents
()
{
cc
.
find
(
'
Canvas/bg/chessBoard/boardItems
'
).
children
.
forEach
(
node
=>
{
let
itemData
=
node
.
getComponent
(
"
BoardGame2_ItemData
"
);
if
(
!
itemData
)
{
...
...
@@ -131,6 +129,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
});
}
getJumpList
()
{
const
jumpList
=
[];
// cc.find('Canvas/bg/chessBoard/boardItems').children.forEach(node => {
// const itemData = node.getComponent("BoardGame2_ItemData");
// if (itemData.jump) {
...
...
@@ -1200,13 +1203,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
private
checkWords
(
data
)
{
const
sentences
=
data
.
result
.
sentences
;
if
(
!
sentences
)
return
true
;
for
(
let
i
=
0
;
i
<
sentences
.
length
;
i
++
)
{
const
details
=
sentences
[
i
].
details
;
const
isSuccess
=
details
.
some
(
item
=>
item
.
overall
<=
40
);
if
(
isSuccess
)
{
return
false
;
}
if
(
isSuccess
)
return
false
;
}
return
true
;
}
...
...
assets/l2_boardgame2/script/Server.ts
View file @
36bc1536
...
...
@@ -114,7 +114,7 @@ export class GameServer {
this
.
addPlayer
(
playerInfo
);
}
//TODO:调试加速
},
1000
)
//RandomInt(10000, 15000)
},
1000
0
)
//RandomInt(10000, 15000)
);
}
}
...
...
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