Commit a3dafe37 authored by asdf's avatar asdf

只要最后一页完成就结束

parent 0c6a9189
...@@ -114,10 +114,6 @@ cc.Class({ ...@@ -114,10 +114,6 @@ cc.Class({
loadEnd() { loadEnd() {
GameData.questionIndex = 0; GameData.questionIndex = 0;
this.questionList = [];
for (let i = 0; i < this.data.questionList.length; i++) {
this.questionList[i] = i;
}
this.initData(); this.initData();
this.startGame(); this.startGame();
...@@ -254,16 +250,11 @@ cc.Class({ ...@@ -254,16 +250,11 @@ cc.Class({
}, },
checkOver() { checkOver() {
for (let i = 0; i < this.questionList.length; i++) { if (GameData.questionIndex != this.data.questionList.length - 1) {
if (this.questionList[i] == GameData.questionIndex) { return;
this.questionList.splice(i, 1);
break;
}
}
if (this.questionList.length == 0) {
let node = cc.instantiate(this.layerOver);
node.parent = this.node;
} }
let node = cc.instantiate(this.layerOver);
node.parent = this.node;
}, },
moveToQuestion(ItemAnswer) { moveToQuestion(ItemAnswer) {
......
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