Commit c7c9e3c5 authored by Tt's avatar Tt

画面出现提前

parent 4947222f
......@@ -267,6 +267,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
this.onTouchCheckCantouch = true;
let page = Game.getIns().getCurrentPage();
if (!!page.image) {
this.layout_card.active = false;
this.layout_card_result.active = true;
//执行效果
let img = pg.view.find(this.layout_card_result, "img");
pg.view.setNetImg(img, page.image, { w: 340, h: 150 })
}
pg.audio.playAudioByUrl(page.audio).then(() => {
pg.event.emit("mouse_add");
setTimeout(() => {
......@@ -299,13 +306,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
updateCardResult() {
return new Promise((res, rej) => {
let page = Game.getIns().getCurrentPage();
if (!!page.image) {
this.layout_card.active = false;
this.layout_card_result.active = true;
//执行效果
let img = pg.view.find(this.layout_card_result, "img");
pg.view.setNetImg(img, page.image, { w: 340, h: 150 })
}
//显示小老鼠
if (page.voice) {
pg.event.on("mouse_start_play_success", () => { res(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