/ld26

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

« back to all changes in this revision

Viewing changes to main.lua

  • Committer: Josh C
  • Date: 2013-04-28 18:52:04 UTC
  • Revision ID: josh@9ix.org-20130428185204-auxrflmqghvti2zm
put levels in their own file

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
require 'svg_levels'
17
17
 
18
18
GameView = View:extend {
 
19
   level = 'shore', --default level
19
20
   onNew = function (self)
20
21
              --print('loading level: '..self.level)
21
22
              if not levels[self.level] then
40
41
   draw = function (self, x, y)
41
42
             View.draw(self, x, y)
42
43
             --love.graphics.print('FPS:' .. love.timer.getFPS(), 20, 20)
43
 
             --love.graphics.print('version:' .. VERSION, 20, 570)
 
44
             love.graphics.print('version:' .. VERSION, 20, 570)
44
45
          end,
45
46
   onUpdate = function (self, dt)
46
47
              end
47
48
}
48
49
 
49
50
the.app = App:new {
50
 
   level = 'shore', --default level
51
51
   onRun = function (self)
52
 
              print('Version: ' .. VERSION)
53
 
              self.view = GameView:new{level = self.level}
 
52
              self.view = GameView:new()
54
53
              if DEBUG then
55
54
                 self.console:watch('VERSION', 'VERSION')
56
55
                 self.console:watch('updateTook', 'the.updateTook')
79
78
-- for accessing from debug console
80
79
function l(level)
81
80
   the.app.view = GameView:new{level = level}
82
 
end
83
 
 
84
 
function love.load(arg)
85
 
   if arg[2] then
86
 
      the.app.level = arg[2]
87
 
   end
88
 
 
89
 
   the.app:run()
90
81
end
 
 
b'\\ No newline at end of file'