Commit fb7ad368 authored by liujiangnan's avatar liujiangnan

feat

parent 9225c44a
......@@ -22,6 +22,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
async onLoadEnd() {
await this.initView();
this.initListener();
playAudioByUrl(this.data.questionTextAudio);
}
rows = [];
......
......@@ -102,6 +102,7 @@ export function getDistance(start, end) {
export function playAudioByUrl(audio_url, cb = null) {
if (audio_url) {
cc.audioEngine.stopAll();
cc.assetManager.loadRemote(audio_url, (err, audioClip) => {
const audioId = cc.audioEngine.play(audioClip, false, 0.8);
if (cb) {
......
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