Commit 6287e5e7 authored by limingzhe's avatar limingzhe

fix: debug

parent 486a8399
This diff is collapsed.
...@@ -183,7 +183,16 @@ cc.Class({ ...@@ -183,7 +183,16 @@ cc.Class({
console.log('showGameOver'); console.log('showGameOver');
// this.moveGrassInterval // this.moveGrassInterval
clearInterval(this.moveGrassInterval); clearInterval(this.moveGrassInterval);
cc.director.loadScene('SN11_end');
// cc.director.loadScene('SN11_end');
this.showEnd();
},
showEnd() {
const endLayer = cc.find("Canvas/game_end");
endLayer.zIndex = 99;
endLayer.active = true;
}, },
nextQuestion() { nextQuestion() {
......
This diff is collapsed.
...@@ -37,10 +37,10 @@ cc.Class({ ...@@ -37,10 +37,10 @@ cc.Class({
async start() { async start() {
cc.audioEngine.play(this['结束']); cc.audioEngine.play(this['结束']);
const btnRestart = cc.find('Canvas/BtnRestart'); const btnRestart = cc.find('Canvas/game_end/BtnRestart');
btnRestart.active = false; btnRestart.active = false;
btnRestart.opacity = 0; btnRestart.opacity = 0;
const nodeCharactor = cc.find('Canvas/NodeCharactor'); const nodeCharactor = cc.find('Canvas/game_end/NodeCharactor');
await asyncTweenTo(nodeCharactor, 0.6, { y: 150 }, { easing: 'quadOut' }); await asyncTweenTo(nodeCharactor, 0.6, { y: 150 }, { easing: 'quadOut' });
this.showRibbons(); this.showRibbons();
...@@ -68,23 +68,34 @@ cc.Class({ ...@@ -68,23 +68,34 @@ cc.Class({
cc.audioEngine.play(this['点击']); cc.audioEngine.play(this['点击']);
btnRestart.active = false; btnRestart.active = false;
cc.director.loadScene('tyzdc', () => {
const btnStart = cc.find(`Canvas/BtnStart`);
btnStart.active = false; const middleLayer = cc.find('middleLayer');
// cc.find(`Canvas`).getComponent('tyzdc').gameStart(); if (middleLayer) {
}); middleLayer.getComponent('middleLayer').reloadBundle();
} else {
cc.audioEngine.stopAll();
cc.director.loadScene('SN11', () => {});
}
// cc.director.loadScene('SN11', () => {
// const btnStart = cc.find(`Canvas/game_end/BtnStart`);
// btnStart.active = false;
// // cc.find(`Canvas`).getComponent('tyzdc').gameStart();
// });
}) })
.start(); .start();
}); });
}, },
showFinishStone() { showFinishStone() {
const stoneNodeBase = cc.find('Canvas/StoneNodeBase'); const stoneNodeBase = cc.find('Canvas/game_end/StoneNodeBase');
stoneNodeBase.active = true; stoneNodeBase.active = true;
stoneNodeBase.zIndex = 25; stoneNodeBase.zIndex = 25;
stoneNodeBase.opacity = 255; stoneNodeBase.opacity = 255;
const nodeLight = cc.find('Canvas/StoneNodeBase/NodeLight'); const nodeLight = cc.find('Canvas/game_end/StoneNodeBase/NodeLight');
nodeLight.opacity = 0; nodeLight.opacity = 0;
cc.tween(nodeLight) cc.tween(nodeLight)
.to(3, { opacity: 255, angle: -360 }) .to(3, { opacity: 255, angle: -360 })
...@@ -93,7 +104,7 @@ cc.Class({ ...@@ -93,7 +104,7 @@ cc.Class({
.start(); .start();
for (let index = 0; index < 6; index++) { for (let index = 0; index < 6; index++) {
const nodeStar = cc.find(`Canvas/StoneNodeBase/NodeStarBase/NodeStar_${index}`); const nodeStar = cc.find(`Canvas/game_end/StoneNodeBase/NodeStarBase/NodeStar_${index}`);
nodeStar.scale = Math.random() * 0.7 + 0.3; nodeStar.scale = Math.random() * 0.7 + 0.3;
cc.tween(nodeStar) cc.tween(nodeStar)
.to(1, { scale: 0, opacity: 0 }) .to(1, { scale: 0, opacity: 0 })
......
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