/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:15:15 UTC
  • Revision ID: josh@9ix.org-20130309051515-tgd962is9kse7kfo
don't quit w/ escape if debug console is up

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)
97
100
              --print(inspect(_(the.app):keys()))
98
101
           end,
99
102
   onUpdate = function (self, dt)
100
 
                 -- TODO: make this not work if debug console is active
101
 
                 if the.keys:justPressed('escape') then
 
103
                 if the.keys:justPressed('escape') and 
 
104
                   not self.console.visible then
102
105
                    love.event.quit()
103
106
                 end
104
107
              end