Explorar o código

Randomize pitch;

bjorn %!s(int64=10) %!d(string=hai) anos
pai
achega
6ec509ccab
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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