/spacey

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

« back to all changes in this revision

Viewing changes to main.lua

  • Committer: Josh C
  • Date: 2013-05-20 17:54:50 UTC
  • Revision ID: josh@9ix.org-20130520175450-1p2jpuadg24xutlk
some instructions at game over

Show diffs side-by-side

added added

removed removed

Lines of Context:
108
108
              --the.player = CrystalPlayer:new{x=400,y=300}
109
109
              the.player = SpacePlayer:new{x=1366,y=768}
110
110
              self:add(the.player)
111
 
              self:add(the.player.thrust)
112
111
 
113
112
              --self:add(Enemy:new{x=400, y=300})
114
113
 
275
274
              end
276
275
           end,
277
276
   onUpdate = function (self, dt)
278
 
                 if the.keys:justPressed('q') then
 
277
                 if the.keys:justPressed('escape') then
279
278
                    self.quit()
280
 
                 elseif the.keys:justPressed('return') then
281
 
                    self.view = GameView:new()
282
 
                 elseif the.keys:justPressed('f1') then
283
 
                    local ss = love.graphics.newScreenshot()
284
 
                    ss:encode('screenshot-' ..love.timer.getTime()..'.png')
285
279
                 end
286
280
              end,
287
281
   update = function (self, dt)