浏览代码

Randomize pitch;

bjorn 10 年之前
父节点
当前提交
6ec509ccab
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      person.lua

+ 1 - 0
person.lua

@@ -125,6 +125,7 @@ function Person.dead:enter()
   if self.gender == 'male' and love.math.random() < .75 then
     self.screamSound = ctx.sound:play('scream2', function(sound)
       sound:setVolume(.75)
+      sound:setPitch(.8 + love.math.random() * .4)
     end)
     self.screamed = true
   end