Commit e0fed0f2 authored by limingzhe's avatar limingzhe

fix: debug

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