2
0
bjorn 10 жил өмнө
parent
commit
abd4045fbb
2 өөрчлөгдсөн 3 нэмэгдсэн , 1 устгасан
  1. BIN
      media/sounds/crash.ogg
  2. 3 1
      pigeon.lua

BIN
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 = {}