/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-05-13 20:41:14 UTC
  • Revision ID: josh@9ix.org-20130513204114-wtg735gs4b38wad4
extract wrapping behavior, wrap bullets

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
                        self.acceleration:rotate_inplace(self.rotation)
42
42
                     else
43
43
                        self.acceleration = {x=0, y=0}
44
 
                        if DEBUG and the.console.visible then
45
 
                           self.velocity = {x=0, y=0}
46
 
                        end
47
44
                     end
48
45
 
49
46
                     if the.mouse:pressed() and -- assumes left button
51
48
                       the.cursor:inTargetArea() then
52
49
                           --print('pew')
53
50
                           b = Bullet:new{
54
 
                              x = self.x + self.width / 2,
55
 
                              y = self.y + self.height / 2,
 
51
                              x = self.x, y = self.y,
56
52
                           }
57
53
                           the.app.view:add(b)
58
54
                           self.lastFired = love.timer.getTime()