/traderous

To get this branch, use:
bzr branch http://9ix.org/bzr/traderous

« back to all changes in this revision

Viewing changes to player.lua

  • Committer: Josh C
  • Date: 2013-06-19 00:50:23 UTC
  • Revision ID: josh@9ix.org-20130619005023-necyd2i8kgqbp1s9
shield

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
                           b = Bullet:new{
62
62
                              x = self.x + self.width / 2,
63
63
                              y = self.y + self.height / 2,
64
 
                              rotation = self.rotation,
65
 
                              source = self
 
64
                              rotation = self.rotation
66
65
                           }
67
66
                           self.lastFired = love.timer.getTime()
68
67
                     end
76
75
                   self:collide(the.rockColliders)
77
76
                end,
78
77
   onCollide = function(self, other)
79
 
                  if other:instanceOf(Bullet) and other.source ~= self then
 
78
                  if other:instanceOf(Bullet) then
80
79
                     if self.shield.strength == 0 then
81
80
                        -- die
82
81
                        the.app.view:add( Boom:new {
89
88
                        self.thrust:die()
90
89
                     else
91
90
                        self.shield:onHit()
 
91
                        other:die()
 
92
                        the.bullets:remove(other)
92
93
                     end
93
 
 
94
 
                     other:die()
95
 
                     the.bullets:remove(other)
96
94
                  end
97
95
 
98
96
                  if other:instanceOf(RockCollider) then