xx 1 년 전
부모
커밋
b3fdef5b1b
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  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)){