Commit 680d9f17 authored by 范雪寒's avatar 范雪寒

feat: autoPlay

parent 9e0d4d31
...@@ -75,7 +75,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -75,7 +75,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
} }
if (this.data.audio && this.data.audio !== '') { if (this.data.audio && this.data.audio !== '' && this.data.autoPlay) {
let girl_ske = cc.find('Canvas/girl_ske').getComponent(dragonBones.ArmatureDisplay); let girl_ske = cc.find('Canvas/girl_ske').getComponent(dragonBones.ArmatureDisplay);
girl_ske.playAnimation('speak', 0); girl_ske.playAnimation('speak', 0);
this.playAudioByUrl(this.data.audio, () => { this.playAudioByUrl(this.data.audio, () => {
......
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