/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-19 01:35:57 UTC
  • Revision ID: josh@9ix.org-20130419013557-jbmje9kqsagj0x3j
title screen

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 
 
76
                      (self.onGround or
76
77
                       (DEBUG and the.console.visible) or
77
78
                       (love.timer.getTime() - self.leftWallAt < .1) ) then
78
79
                        self.velocity.y = -400
79
80
                        self.jumping = true
 
81
                        --love.audio.play(self.jump)
80
82
                     end
81
83
                  end,
82
84
   update = function (self, elapsed)