Kaynağa Gözat

Merge branch 'master' of github.com:bjornswenson/pigeon

bjorn 10 yıl önce
ebeveyn
işleme
37147f495e

BIN
media/graphics/bread.png


BIN
media/graphics/cloud1.png


BIN
media/graphics/cloud2.png


BIN
media/graphics/cloud3.png


BIN
media/graphics/kingdumb/castle.png


+ 1 - 1
person.lua

@@ -129,7 +129,7 @@ function Person.dead:enter(cause)
   self.body:applyLinearImpulse(-200 + love.math.random() * 400, -200 + love.math.random() * -500)
   self.body:setAngularVelocity(-20 + love.math.random() * 40)
   ctx.hud:addScore(10, 'person', cause)
-  ctx.nonPeckKill = ctx.nonPeckKill or (cause ~= 'peck')
+  ctx.nonPeckKill = ctx.nonPeckKill or cause == 'step' or cause == 'jump'
   ctx.stats.peopleKilled = ctx.stats.peopleKilled + 1
   if self:isMale() and love.math.random() < .75 then
     self.screamSound = ctx.sound:play('scream2', function(sound)

+ 2 - 2
pigeon.lua

@@ -264,9 +264,9 @@ function Pigeon:collideWith(other, myFixture)
     if self.state == self.peck and (myFixture == self.beak.top.fixture or myFixture == self.beak.bottom.fixture) then
       other:changeState('dead', 'peck')
     elseif self.state == self.walk and self.drop and myFixture == self.feet[self.drop].fixture then
-      other:changeState('dead')
+      other:changeState('dead', 'step')
     elseif self.crushGrace > 0 and (myFixture == self.feet.left.fixture or myFixture == self.feet.right.fixture) then
-      other:changeState('dead')
+      other:changeState('dead', 'jump')
     end
   elseif isa(other, Building) and not other.destroyed and self.state == self.peck and (myFixture == self.beak.top.fixture or myFixture == self.beak.bottom.fixture) then
     other:destroy()