Commit 36bc1536 authored by Tt's avatar Tt

2人匹配bug修复

parent 4277b60f
...@@ -105,15 +105,13 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -105,15 +105,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
initView() { initView() {
this.addComponents();
this.hideVoice(); this.hideVoice();
this.initBg(); this.initBg();
this.initLoadingLayer(); this.initLoadingLayer();
this.initPiece(); this.initPiece();
} }
addComponents() {
getJumpList() {
const jumpList = [];
cc.find('Canvas/bg/chessBoard/boardItems').children.forEach(node => { cc.find('Canvas/bg/chessBoard/boardItems').children.forEach(node => {
let itemData = node.getComponent("BoardGame2_ItemData"); let itemData = node.getComponent("BoardGame2_ItemData");
if (!itemData) { if (!itemData) {
...@@ -131,6 +129,11 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -131,6 +129,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
} }
}); });
}
getJumpList() {
const jumpList = [];
// cc.find('Canvas/bg/chessBoard/boardItems').children.forEach(node => { // cc.find('Canvas/bg/chessBoard/boardItems').children.forEach(node => {
// const itemData = node.getComponent("BoardGame2_ItemData"); // const itemData = node.getComponent("BoardGame2_ItemData");
// if (itemData.jump) { // if (itemData.jump) {
...@@ -1200,13 +1203,11 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -1200,13 +1203,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
private checkWords(data) { private checkWords(data) {
const sentences = data.result.sentences; const sentences = data.result.sentences;
if (!sentences) return true;
for (let i = 0; i < sentences.length; i++) { for (let i = 0; i < sentences.length; i++) {
const details = sentences[i].details; const details = sentences[i].details;
const isSuccess = details.some(item => item.overall <= 40); const isSuccess = details.some(item => item.overall <= 40);
if (isSuccess) { if (isSuccess) return false;
return false;
}
} }
return true; return true;
} }
......
...@@ -114,7 +114,7 @@ export class GameServer { ...@@ -114,7 +114,7 @@ export class GameServer {
this.addPlayer(playerInfo); this.addPlayer(playerInfo);
} }
//TODO:调试加速 //TODO:调试加速
}, 1000)//RandomInt(10000, 15000) }, 10000)//RandomInt(10000, 15000)
); );
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment