Commit 66d84c06 authored by chenzihui's avatar chenzihui

2

parent c08c9f47
...@@ -101,7 +101,6 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -101,7 +101,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
startGame(){ startGame(){
this.rightQuestion = 0;
this.initQuestionView(); this.initQuestionView();
this.initAnswerView(); this.initAnswerView();
this.moveInCakeNode(); this.moveInCakeNode();
...@@ -580,7 +579,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -580,7 +579,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
gameEnd(){ gameEnd(){
console.log("答对的题目数量" + this.rightQuestion); console.log("答对的题目数量" + this.rightQuestion);
if(this.rightQuestion >= this.data.questions.length){ if(this.rightQuestion >= this.data.questions.length){
this.allWinEnd.node.active = true; this.allWinEnd.node.active = true;
this.allWinEnd.playAnimation('newAnimation', 1); this.allWinEnd.playAnimation('newAnimation', 1);
...@@ -598,6 +597,8 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -598,6 +597,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.showEndCome(); this.showEndCome();
this.playLocalAudio("effect_end"); this.playLocalAudio("effect_end");
} }
this.rightQuestion = 0;
} }
// _cantouch = null; // _cantouch = null;
......
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