bjorn 10 年之前
父節點
當前提交
abd4045fbb
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 二進制
      media/sounds/crash.ogg
  2. 3 1
      pigeon.lua

二進制
media/sounds/crash.ogg


+ 3 - 1
pigeon.lua

@@ -117,7 +117,6 @@ function Pigeon:init()
     elseif name == 'laser' then
       self.laser.active = true
     elseif name == 'peck' and self.state == self.peck then
-      ctx.sound:play(data.media.sounds.impact)
       self.peck.impact(self)
     end
   end)
@@ -592,6 +591,9 @@ end
 
 function Pigeon.peck:impact()
   ctx.view:screenshake(20)
+  ctx.sound:play('crash', function(sound)
+    sound:setVolume(.5)
+  end)
 end
 
 Pigeon.laser = {}