bjorn 10 年之前
父节点
当前提交
eaee5e27e3
共有 2 个文件被更改,包括 6 次插入0 次删除
  1. 二进制
      media/sounds/wilhelm.ogg
  2. 6 0
      person.lua

二进制
media/sounds/wilhelm.ogg


+ 6 - 0
person.lua

@@ -128,6 +128,12 @@ function Person.dead:enter()
       sound:setPitch(.8 + love.math.random() * .4)
     end)
     self.screamed = true
+  elseif love.math.random() < .02 then
+    self.screamSound = ctx.sound:play('wilhelm', function(sound)
+      sound:setVolume(.75)
+      sound:setPitch(.8 + love.math.random() * .4)
+    end)
+    self.screamed = true
   end
 end