Browse Source

Male scream;

bjorn 10 years ago
parent
commit
7206fbd5ce
2 changed files with 6 additions and 0 deletions
  1. BIN
      media/sounds/scream2.ogg
  2. 6 0
      person.lua

BIN
media/sounds/scream2.ogg


+ 6 - 0
person.lua

@@ -122,6 +122,12 @@ function Person.dead:enter()
   self.body:setAngularVelocity(-20 + love.math.random() * 40)
   self.body:setAngularVelocity(-20 + love.math.random() * 40)
   ctx.hud:addScore(10, 'person')
   ctx.hud:addScore(10, 'person')
   ctx.sound:play('pop')
   ctx.sound:play('pop')
+  if self.gender == 'male' and love.math.random() < .75 then
+    self.screamSound = ctx.sound:play('scream2', function(sound)
+      sound:setVolume(.75)
+    end)
+    self.screamed = true
+  end
 end
 end
 
 
 function Person.dead:update()
 function Person.dead:update()