Commit 97285f9a authored by yu's avatar yu

1

parent e2e480f0
......@@ -49,8 +49,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
"width": 150,
"height": 150
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -188,7 +188,7 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "d649146b-22ea-4f4f-ae01-ceb7f495bfdc"
},
"fileId": "b2AVtPfI1H8rsYBg+57NsK",
"sync": false
......@@ -295,7 +295,7 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "d649146b-22ea-4f4f-ae01-ceb7f495bfdc"
},
"fileId": "28xDtc6+BJ74MCN73DdTk4",
"sync": false
......@@ -402,7 +402,7 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "d649146b-22ea-4f4f-ae01-ceb7f495bfdc"
},
"fileId": "3bzotBPcdH6KRt6Og7x6F9",
"sync": false
......@@ -435,7 +435,7 @@
"_id": ""
},
{
"__type__": "f6509JnLAlKfZ9VLFWlQcNk",
"__type__": "8fa11v2FMRF5aYUQ2xw3/ss",
"_name": "",
"_objFlags": 0,
"node": {
......@@ -450,7 +450,7 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "d649146b-22ea-4f4f-ae01-ceb7f495bfdc"
},
"fileId": "",
"sync": false
......
......@@ -115,8 +115,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg.event.on("layer_record_score", (score) => {
});
pg.event.on('npc_voice_play_voice_end', () => {
pg.event.on('npc_voice_play_voice_end', async () => {
asyncDelay(0.3);
this.playQuestAudio();
})
pg.event.emit('npc_layer_back_init', this.data)
......@@ -149,6 +150,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
let pic_light = cc.find("pic_light", node.parent);
if (pic_light) pic_light.active = false;
});
cc.find("img_voice", this.node).on(cc.Node.EventType.TOUCH_END, () => {
this.playQuestAudio();
})
}
sendData(score) {
......@@ -175,11 +179,25 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.initData();
this.initView();
}
private playQuestAudio() {
cc.audioEngine.stopAllEffects();
let question = Game.getIns().getCurrentPage();
if (question.audioUrl != "") {
pg.event.emit("img_voice_play_voice_start");
pg.audio.playAudioByUrl(question.audioUrl).then(async () => {
this.isClick = true;
pg.event.emit("img_voice_play_voice_end");
})
} else {
this.isClick = true;
}
}
private playOpAudio() {
let question = Game.getIns().getCurrentPage();
if (question.audioUrl != "") {
pg.event.emit("img_voice_play_voice_start");
pg.audio.playAudioByUrl(question.audioUrl).then(async () => {
pg.event.emit("img_voice_play_voice_end");
await asyncDelay(0.5);
pg.event.emit("layer_right_show_excellent");
})
......@@ -294,7 +312,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
await asyncDelay(0.03);
box_up.active = isBig;
this.isClick = true;
if (isBig && this.layout_up.width < this.layout_down.width) {
this.layout_up.getComponent(cc.Layout).enabled = false;
this.layout_up.width = this.layout_down.width;
......
......@@ -24,8 +24,8 @@ export const defaultData = {
"check": 1
}
],
"audio": "",
// "audio": "http://staging-teach.cdn.ireadabc.com/83268f4def70e408cf9243bc214592b6_l.mp3",
// "audio": "",
"audio": "http://staging-teach.cdn.ireadabc.com/83268f4def70e408cf9243bc214592b6_l.mp3",
"contentMain": "what is\n your name?",
"text": "",
"audioName": "bear_1.mp3"
......
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