/zoeplat

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

« back to all changes in this revision

Viewing changes to main.lua

  • Committer: Josh C
  • Date: 2013-03-09 05:02:20 UTC
  • Revision ID: josh@9ix.org-20130309050220-bd1ybunyhk8fhwyw
reapply jump animation after Y collision.  (there's a frame of no 
jumping no falling that I can't do anything about w/o doing better 
collision handling)

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
                     if self.falling then self.jumping = false end
28
28
                     --print(self.jumping, self.falling)
29
29
 
 
30
                     if not self:onGround() then
 
31
                        self:play('jump')
 
32
                     end
 
33
 
30
34
                     self.velocity.x = 0
31
35
                     self.acceleration.y = 800
32
36
 
43
47
                     if the.keys:justPressed('up') and self:onGround() then
44
48
                        self.velocity.y = -400
45
49
                        self.jumping = true
46
 
                        self:play('jump')
47
50
                     end
48
51
                  end,
49
52
   onEndFrame = function (self)