Commit e7c4f3d2 authored by limingzhe's avatar limingzhe

feat: 重新开始

parent dbd51dc9
No preview for this file type
{"ver":"1.1.2","uuid":"c35bb2f6-f24a-4850-ae44-643f2fdc7541","isBundle":false,"bundleName":"","priority":1,"compressionType":{},"optimizeHotUpdate":{},"inlineSpriteFrames":{},"isRemoteBundle":{"ios":false,"android":false},"subMetas":{}}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "c35bb2f6-f24a-4850-ae44-643f2fdc7541",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {
"ios": false,
"android": false
},
"subMetas": {}
}
\ No newline at end of file
......@@ -173,6 +173,9 @@ cc.Class({
cc.log("btnCoolCat");
if (this._can_tap != true)
return;
if (this.isGameEnd) {
return;
}
this._can_tap=false;
cc.log("paint 点击");
playDragonBoneAnimation(this.coolcat, 'wrong', -1);
......@@ -481,7 +484,7 @@ cc.Class({
},
showRestartBtn() {
return;
// return;
const btn = cc.find('Canvas/bg/btnReplay');
if (btn.canClick) {
return;
......@@ -622,6 +625,8 @@ cc.Class({
console.log('isCanFinish:', isCanFinish);
if (isCanFinish) {
this.isGameEnd = true;
this.playAudioByUrl(this.data.finishAudio,()=>{
this.showRestartBtn();
onHomeworkFinish();
......@@ -672,6 +677,11 @@ cc.Class({
let sprite = tooth;
sprite.on(cc.Node.EventType.TOUCH_START, (e) => {
if (this.isGameEnd) {
return;
}
console.log('this.isGameEnd: ', this.isGameEnd);
e.stopPropagation();
if (this._can_tap != true)
......
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