xx 1 năm trước cách đây
mục cha
commit
b3fdef5b1b
1 tập tin đã thay đổi với 2 bổ sung3 xóa
  1. 2 3
      assets/script/manager/audioManager.ts

+ 2 - 3
assets/script/manager/audioManager.ts

@@ -75,10 +75,9 @@ export class audioManager extends Component {
             return
         }
         let loop:boolean = false
-        let play = (node)=>{
+        let play = (node:Node)=>{
             node.getComponent(AudioSource).stop()
-            node.getComponent(AudioSource).play()
-
+            node.getComponent(AudioSource).playOneShot(node.getComponent(AudioSource).clip,1)
             // node.getComponent(AudioSource).playOneShot(node.getComponent(AudioSource).clip,soundVolume?soundVolume:this.soundVolume)
         }
         if(this.audios_map.get(path)){