diff --git a/play/assets/tmpGame/script/Scene.js b/play/assets/tmpGame/script/Scene.js index 8e366fd96e57383ffbe638e9eb1f6343d4e757a2..c93b40c6e2dceefd300d1dbe9f8c34a180345ee2 100644 --- a/play/assets/tmpGame/script/Scene.js +++ b/play/assets/tmpGame/script/Scene.js @@ -114,10 +114,6 @@ cc.Class({ loadEnd() { GameData.questionIndex = 0; - this.questionList = []; - for (let i = 0; i < this.data.questionList.length; i++) { - this.questionList[i] = i; - } this.initData(); this.startGame(); @@ -254,16 +250,11 @@ cc.Class({ }, checkOver() { - for (let i = 0; i < this.questionList.length; i++) { - if (this.questionList[i] == GameData.questionIndex) { - this.questionList.splice(i, 1); - break; - } - } - if (this.questionList.length == 0) { - let node = cc.instantiate(this.layerOver); - node.parent = this.node; + if (GameData.questionIndex != this.data.questionList.length - 1) { + return; } + let node = cc.instantiate(this.layerOver); + node.parent = this.node; }, moveToQuestion(ItemAnswer) {