Commit 5dff1197 authored by Tt's avatar Tt

修改成功时的拖拽禁止操作

parent 8a69c70c
......@@ -194,6 +194,8 @@ cc.Class({
const box_mid = cc.find('Canvas/bg/box_mid');
box_mid.removeAllChildren();
//TODO:copy---end
this.canTouch = true;
this.showSubmitBtn();
const arr = randomSortByArr(this.data.question_arr[questionIdx].option_arr);
arr.forEach(async (option, idx) => {
......@@ -222,6 +224,9 @@ cc.Class({
const box = cc.find('Canvas/bg/box');
optionNode.on(cc.Node.EventType.TOUCH_START, (event) => {
if (!this.canTouch) {
return;
}
if (optionNode.optionData.selected) {
return;
}
......@@ -239,6 +244,9 @@ cc.Class({
this.playAudioByUrl(optionNode.optionData.audio_url);
});
optionNode.on(cc.Node.EventType.TOUCH_MOVE, (event) => {
if (!this.canTouch) {
return;
}
if (optionNode.optionData.selected) {
return;
}
......@@ -247,6 +255,9 @@ cc.Class({
optionNode.y = optionNode.startPos.y + (location.y - optionNode.startLocation.y);
});
optionNode.on(cc.Node.EventType.TOUCH_END, (event) => {
if (!this.canTouch) {
return;
}
if (optionNode.optionData.selected) {
return;
}
......@@ -368,9 +379,10 @@ cc.Class({
onAnswerRight() {
this.canTouch = false;
//TODO:copy---放烟花时机修改
this.showFlower();
this.hideSubmitBtn();
this.coolCatSpeakRight(() => {
//TODO:copy
setTimeout(() => {
......@@ -471,7 +483,7 @@ cc.Class({
return;
}
submitBtn.showed = false;
submitBtn.off('click');
// submitBtn.off('click');
cc.tween(submitBtn)
.by(1, { y: -submitBtn.height })
.start();
......
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