소스 검색

Update music.script

Björn Ritzl 5 년 전
부모
커밋
8971dcff1d
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      examples/sound/music/music.script

+ 2 - 2
examples/sound/music/music.script

@@ -1,7 +1,7 @@
 function init(self)
-    msg.post("#music", "play_sound") -- <1>
+    sound.play("#music", { gain = 1.0, pan = 0 }) -- <1>
 end
 
 --[[
-1. Send message to component "#music" telling it to play its sound.
+1. Tell the component "#music" to start playing its sound. The sound will be played with gain 1.0 (max volume) and pan 0.0 (equal left-right channel)
 --]]