Commit f8123120 authored by Tt's avatar Tt

1

parent fb7e23ea
...@@ -24,6 +24,7 @@ cc.Class({ ...@@ -24,6 +24,7 @@ cc.Class({
_imageResList: null, _imageResList: null,
_audioResList: null, _audioResList: null,
_animaResList: null, _animaResList: null,
touchSubmit: null,
initSceneData() { initSceneData() {
this._imageResList = []; this._imageResList = [];
this._audioResList = []; this._audioResList = [];
...@@ -161,7 +162,8 @@ cc.Class({ ...@@ -161,7 +162,8 @@ cc.Class({
this.status = { this.status = {
currentQuestionIdx: 0, currentQuestionIdx: 0,
wrongTime: 0 wrongTime: 0
} };
this.touchSubmit = true;
}, },
initView() { initView() {
...@@ -246,6 +248,7 @@ cc.Class({ ...@@ -246,6 +248,7 @@ cc.Class({
.to(0.1, { scale: 1 }) .to(0.1, { scale: 1 })
.start(); .start();
}); });
this.touchSubmit = false;
}, },
createOption(optionData) { createOption(optionData) {
...@@ -368,10 +371,11 @@ cc.Class({ ...@@ -368,10 +371,11 @@ cc.Class({
}) })
.start(); .start();
}, },
initListener() { initListener() {
const btnSubmit = cc.find('Canvas/bg/btnSubmit'); const btnSubmit = cc.find('Canvas/bg/btnSubmit');
btnSubmit.on('click', () => { btnSubmit.on('click', () => {
if (this.touchSubmit) return;
this.touchSubmit = true;
this.optionJump(btnSubmit, 0.05); this.optionJump(btnSubmit, 0.05);
this.playEffect('submit'); this.playEffect('submit');
const box = cc.find('Canvas/bg/box'); const box = cc.find('Canvas/bg/box');
...@@ -392,6 +396,7 @@ cc.Class({ ...@@ -392,6 +396,7 @@ cc.Class({
this.onAnswerWrongTwice(); this.onAnswerWrongTwice();
} }
}); });
this.touchSubmit = false;
} }
this.showIdx = 0; this.showIdx = 0;
......
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