Commit 0a8390ce authored by Tt's avatar Tt

小迪待增加

parent 9e62d38b
...@@ -1354,7 +1354,7 @@ ...@@ -1354,7 +1354,7 @@
"__id__": 31 "__id__": 31
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 43 "__id__": 43
......
...@@ -81,8 +81,6 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -81,8 +81,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
initView() { initView() {
let topTitle = cc.find("top/topTitle", this.node); let topTitle = cc.find("top/topTitle", this.node);
pg.view.touchOn(topTitle, this.playTopLaba, this); pg.view.touchOn(topTitle, this.playTopLaba, this);
// let btn_check = cc.find("btn_check", this.node);
// pg.view.touchOn(btn_check, this.touchOver, this);
this.showQuestion(); this.showQuestion();
this.showGame(); this.showGame();
} }
...@@ -100,13 +98,19 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -100,13 +98,19 @@ export default class SceneComponent extends MyCocosSceneComponent {
onHomeworkFinish(data); onHomeworkFinish(data);
} }
private gameOver() { private gameOver() {
setTimeout(() => { this.scheduleOnce(() => {
let btn_check = cc.find("btn_check", this.node); let btn_check = cc.find("btn_check", this.node);
btn_check.getComponent(cc.Button).interactable = true; btn_check.getComponent(cc.Button).interactable = true;
btn_check.active = false;
this.playLocalAudio("sahua"); this.playLocalAudio("sahua");
this.showAllFirework(this.node, cc.find('Canvas/petal').children); this.showAllFirework(this.node, cc.find('Canvas/petal').children);
}, 1);
}, 0.1)
this.scheduleOnce(() => {
// 展示小迪按钮
}, 1.3)
} }
private showGame() { private showGame() {
if (this.roundIdx >= this.data.questions.length) { if (this.roundIdx >= this.data.questions.length) {
...@@ -119,15 +123,17 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -119,15 +123,17 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.showLayout(); this.showLayout();
} }
private showQuestion() { private showQuestion() {
let quest = this.data.top; // 顶部效果
let desc = cc.find("top/topTitle/title", this.node);
let img = cc.find("top/boy", this.node); // let quest = this.data.top;
desc.active = true; // let desc = cc.find("top/topTitle/title", this.node);
desc.getComponent(cc.Label).string = quest.text; // let img = cc.find("top/boy", this.node);
if (quest.audio) { // desc.active = true;
this.playTopLaba() // desc.getComponent(cc.Label).string = quest.text;
} // if (quest.audio) {
pg.view.setNetImg(img, quest.image, { w: 70, h: 70 }); // this.playTopLaba()
// }
// pg.view.setNetImg(img, quest.image, { w: 70, h: 70 });
} }
private intervalId; private intervalId;
private playTopLaba() { private playTopLaba() {
......
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