Commit 0a8390ce authored by Tt's avatar Tt

小迪待增加

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