Commit 9aecdded authored by limingzhe's avatar limingzhe

fix: debug

parent 772f6373
...@@ -327,6 +327,9 @@ cc.Class({ ...@@ -327,6 +327,9 @@ cc.Class({
cc.tween(this) cc.tween(this)
.delay(0.3) .delay(0.3)
.call(() => { .call(() => {
if (this.isDestroy) {
return;
}
this.showPenguin(); this.showPenguin();
}) })
.start(); .start();
...@@ -428,6 +431,9 @@ cc.Class({ ...@@ -428,6 +431,9 @@ cc.Class({
cc.tween(this) cc.tween(this)
.delay(0.3) .delay(0.3)
.call(() => { .call(() => {
if (this.isDestroy) {
return;
}
this.showOnePenguin(); this.showOnePenguin();
}) })
.start(); .start();
...@@ -567,6 +573,9 @@ cc.Class({ ...@@ -567,6 +573,9 @@ cc.Class({
cc.tween(this) cc.tween(this)
.delay(1) .delay(1)
.call(() => { .call(() => {
if (this.isDestroy) {
return;
}
this.showOnePenguin(); this.showOnePenguin();
}) })
.start(); .start();
...@@ -656,6 +665,9 @@ cc.Class({ ...@@ -656,6 +665,9 @@ cc.Class({
.delay(0.6) .delay(0.6)
.to(0.8, { scale: 0 }, { easing: 'quadOut' }) .to(0.8, { scale: 0 }, { easing: 'quadOut' })
.call(() => { .call(() => {
if (this.isDestroy) {
return;
}
this.checkGameEnd(); this.checkGameEnd();
}) })
.start(); .start();
...@@ -696,6 +708,9 @@ cc.Class({ ...@@ -696,6 +708,9 @@ cc.Class({
} }
await asyncDelay(1); await asyncDelay(1);
if (this.isDestroy) {
return;
}
this.initCurGroup(); this.initCurGroup();
...@@ -710,6 +725,9 @@ cc.Class({ ...@@ -710,6 +725,9 @@ cc.Class({
cc.tween(this) cc.tween(this)
.delay(0.2) .delay(0.2)
.call(() => { .call(() => {
if (this.isDestroy) {
return;
}
onHomeworkFinish(); onHomeworkFinish();
this.showRestartBtn(); this.showRestartBtn();
}) })
...@@ -870,10 +888,16 @@ cc.Class({ ...@@ -870,10 +888,16 @@ cc.Class({
.to(moveTime, { y: 120 }, { easing: 'quadInOut' }) .to(moveTime, { y: 120 }, { easing: 'quadInOut' })
.delay(standTime) .delay(standTime)
.call(() => { .call(() => {
if (this.isDestroy) {
return;
}
hidePanel(); hidePanel();
}) })
.to(moveTime, { y: downY }, { easing: 'quadInOut' }) .to(moveTime, { y: downY }, { easing: 'quadInOut' })
.call(() => { .call(() => {
if (this.isDestroy) {
return;
}
penguin.active = false; penguin.active = false;
penguin.penguin.active = true; penguin.penguin.active = true;
penguin.wrong.active = false; penguin.wrong.active = false;
...@@ -892,7 +916,9 @@ cc.Class({ ...@@ -892,7 +916,9 @@ cc.Class({
cc.tween(this) cc.tween(this)
.delay(nextTime) .delay(nextTime)
.call(() => { .call(() => {
if (this.isDestroy) {
return;
}
if (!this.isRightDuration) { if (!this.isRightDuration) {
this.showOnePenguin(); this.showOnePenguin();
} }
...@@ -1504,5 +1530,8 @@ cc.Class({ ...@@ -1504,5 +1530,8 @@ cc.Class({
}); });
}, },
onDestroy() {
this.isDestroy = 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