Commit e0fed0f2 authored by limingzhe's avatar limingzhe

fix: debug

parent 87364bc7
......@@ -714,12 +714,17 @@ cc.Class({
const eBoxNode = cc.find("editBox", inputNode);
eBoxNode.on('editing-did-ended', this.onEditBoxEnded, this);
const eBox = eBoxNode.getComponent(cc.EditBox);
eBox.data = data;
this.editBoxArr.push(eBox);
eBoxNode.on('editing-did-ended', () => {
this.onEditBoxEnded(eBox);
});
// const inputBg = getSprNode('input_bg');
......@@ -795,7 +800,16 @@ cc.Class({
},
onEditBoxEnded() {
onEditBoxEnded(curEditBox) {
if (curEditBox) {
const inputNum = curEditBox.string;
if (!inputNum) {
this.playAudioByName('a_o');
return;
}
}
for(let i=0; i<this.editBoxArr.length; i++) {
const editBox = this.editBoxArr[i];
......@@ -817,6 +831,7 @@ cc.Class({
this.playAudioByName('right');
this.checkGameEnd();
},
checkGameEnd() {
......
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