Commit dcbabc03 authored by asdf's avatar asdf

.

parent 190982c2
......@@ -253,6 +253,9 @@ cc.Class({
playLabelGreen(cb) {
this.dragonBone.playAnimation(this.animationName, 1);
this.playAudioOption((duration) => {
if(!cc.isValid(this)){
return;
}
this.scheduleStep = 2;
this.scheduleDuration = duration / 2 / this.label.node.width * this.scheduleStep;
if (this.scheduleDuration < 0.05) {
......
......@@ -353,6 +353,9 @@ cc.Class({
),
cc.callFunc(() => {
itemAnswer.playLabelGreen(()=>{
if(GameData.isOver){
return;
}
if (this.checkOver()) {
this.showLayerOver();
}
......@@ -422,20 +425,20 @@ cc.Class({
GameData.startStepDone = false;
},
onTurnLast() {
if(GameData.isOver){
if (GameData.audioCount != 0) {
return;
}
GameData.questionIndex--;
this.resetDate();
},
onReplay() {
if(GameData.isOver){
if (GameData.audioCount != 0) {
return;
}
this.resetDate();
},
onTurnNext() {
if(GameData.isOver){
if (GameData.audioCount != 0) {
return;
}
GameData.questionIndex++;
......@@ -450,9 +453,6 @@ cc.Class({
if (GameData.audioCount != 0) {
return;
}
if(GameData.isOver){
return;
}
this.playAudioPage(true);
} else if (button.node.name == 'btnLast') {
this.onTurnLast();
......@@ -461,9 +461,6 @@ cc.Class({
} else if (button.node.name == 'btnNext') {
this.onTurnNext();
} else if (button.node.name == 'btnAudio') {
if(GameData.isOver){
return;
}
this.onBtnClickAudio();
}
},
......
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