Commit d3d4ce28 authored by yu's avatar yu

1

parent acac7e50
......@@ -190,10 +190,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
item.active = true;
item.parent = this.layout_up;
let laba = cc.find("laba", item);
laba.active = data.audioUrl != "";
laba.on(cc.Node.EventType.TOUCH_END, () => {
this.playLaba(laba);
})
this.playLaba(laba);
laba.active && this.playLaba(laba);
} else {
let item = cc.instantiate(this.item2);
item.active = true;
......
......@@ -53,7 +53,7 @@ export class Item {
public type: string;
public contentArr: Array<any>;
constructor(data, page) {
this.audioUrl = data.audioUrl;
this.audioUrl = data.audioUrl || "";
this.image = data.questImg;
this.type = data.type;
let id = 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