Commit 03ed217a authored by linzhiguo's avatar linzhiguo

+ 游戏结束(框架代码)

parent 0522a4fb
...@@ -392,12 +392,13 @@ cc.Class({ ...@@ -392,12 +392,13 @@ cc.Class({
this._comeon.active = true; this._comeon.active = true;
playDragonBoneAnimation(this._comeon, 'newAnimation', 1, ()=>{ playDragonBoneAnimation(this._comeon, 'newAnimation', 1, ()=>{
this._comeon.active = false; this._comeon.active = false;
this.gameEnd();
}); });
} }
else{ else{
this.playAudioByName('victory'); this.playAudioByName('victory');
this._flower.active = true; this._flower.active = true;
playDragonBoneAnimation(this._flower, 'normal'); playDragonBoneAnimation(this._flower, 'normal', 1, this.gameEnd);
} }
return; return;
} }
...@@ -405,6 +406,12 @@ cc.Class({ ...@@ -405,6 +406,12 @@ cc.Class({
this.nextMouse(); this.nextMouse();
}, },
gameEnd(){
if (window && window.courseware) {
window.courseware.gameEnd();
}
},
playTimer(cb){ playTimer(cb){
this.timer.node.active = true; this.timer.node.active = true;
this.setTimerString('3'); this.setTimerString('3');
......
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