/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 19:40:13 UTC
  • Revision ID: josh@9ix.org-20130428194013-80jaqhflmrmwgo27
gate

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
20
19
   onNew = function (self)
21
20
              --print('loading level: '..self.level)
22
21
              if not levels[self.level] then
48
47
}
49
48
 
50
49
the.app = App:new {
 
50
   level = 'shore', --default level
51
51
   onRun = function (self)
52
 
              self.view = GameView:new()
 
52
              self.view = GameView:new{level = self.level}
53
53
              if DEBUG then
54
54
                 self.console:watch('VERSION', 'VERSION')
55
55
                 self.console:watch('updateTook', 'the.updateTook')
78
78
-- for accessing from debug console
79
79
function l(level)
80
80
   the.app.view = GameView:new{level = level}
 
81
end
 
82
 
 
83
function love.load(arg)
 
84
   if arg[2] then
 
85
      the.app.level = arg[2]
 
86
   end
 
87
 
 
88
   the.app:run()
81
89
end
 
 
b'\\ No newline at end of file'