Procházet zdrojové kódy

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

bjorn před 10 roky
rodič
revize
37147f495e
7 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. binární
      media/graphics/bread.png
  2. binární
      media/graphics/cloud1.png
  3. binární
      media/graphics/cloud2.png
  4. binární
      media/graphics/cloud3.png
  5. binární
      media/graphics/kingdumb/castle.png
  6. 1 1
      person.lua
  7. 2 2
      pigeon.lua

binární
media/graphics/bread.png


binární
media/graphics/cloud1.png


binární
media/graphics/cloud2.png


binární
media/graphics/cloud3.png


binární
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:applyLinearImpulse(-200 + love.math.random() * 400, -200 + love.math.random() * -500)
   self.body:setAngularVelocity(-20 + love.math.random() * 40)
   self.body:setAngularVelocity(-20 + love.math.random() * 40)
   ctx.hud:addScore(10, 'person', cause)
   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
   ctx.stats.peopleKilled = ctx.stats.peopleKilled + 1
   if self:isMale() and love.math.random() < .75 then
   if self:isMale() and love.math.random() < .75 then
     self.screamSound = ctx.sound:play('scream2', function(sound)
     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
     if self.state == self.peck and (myFixture == self.beak.top.fixture or myFixture == self.beak.bottom.fixture) then
       other:changeState('dead', 'peck')
       other:changeState('dead', 'peck')
     elseif self.state == self.walk and self.drop and myFixture == self.feet[self.drop].fixture then
     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
     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
     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
   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()
     other:destroy()