/zoeplat

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

« back to all changes in this revision

Viewing changes to player.lua

  • Committer: Josh C
  • Date: 2013-04-21 22:19:23 UTC
  • Revision ID: josh@9ix.org-20130421221923-didbkpmw5kcvzaof
clean plist for osx

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
   collisions = {},
13
13
   onWall = false,
14
14
   leftWallAt = 0,
 
15
   jump = love.audio.newSource('data/jump.ogg', 'static'),
15
16
   onNew = function (self)
16
17
              self.velocity.y = 0
17
18
              self.maxVelocity.y = 400
72
73
                     end
73
74
 
74
75
                     if the.keys:justPressed('up') and
75
 
                      (self.onGround or the.console.visible or
 
76
                      (self.onGround or
 
77
                       (DEBUG and the.console.visible) or
76
78
                       (love.timer.getTime() - self.leftWallAt < .1) ) then
77
79
                        self.velocity.y = -400
78
80
                        self.jumping = true
 
81
                        --love.audio.play(self.jump)
79
82
                     end
80
83
                  end,
81
84
   update = function (self, elapsed)