/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-11 01:33:32 UTC
  • Revision ID: josh@9ix.org-20130411013332-7bf1zydct2v4rbyk
zoetrope 1.4 (and revert my sprite changes)

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'),
16
15
   onNew = function (self)
17
16
              self.velocity.y = 0
18
17
              self.maxVelocity.y = 400
73
72
                     end
74
73
 
75
74
                     if the.keys:justPressed('up') and
76
 
                      (self.onGround or
 
75
                      (self.onGround or 
77
76
                       (DEBUG and the.console.visible) or
78
77
                       (love.timer.getTime() - self.leftWallAt < .1) ) then
79
78
                        self.velocity.y = -400
80
79
                        self.jumping = true
81
 
                        --love.audio.play(self.jump)
82
80
                     end
83
81
                  end,
84
82
   update = function (self, elapsed)