/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 20:31:58 UTC
  • Revision ID: josh@9ix.org-20130428203158-uan2kd0ybns063vb
cleanup

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
41
40
   draw = function (self, x, y)
42
41
             View.draw(self, x, y)
43
42
             --love.graphics.print('FPS:' .. love.timer.getFPS(), 20, 20)
44
 
             love.graphics.print('version:' .. VERSION, 20, 570)
 
43
             --love.graphics.print('version:' .. VERSION, 20, 570)
45
44
          end,
46
45
   onUpdate = function (self, dt)
47
46
              end
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
              print('Version: ' .. VERSION)
 
53
              self.view = GameView:new{level = self.level}
53
54
              if DEBUG then
54
55
                 self.console:watch('VERSION', 'VERSION')
55
56
                 self.console:watch('updateTook', 'the.updateTook')
78
79
-- for accessing from debug console
79
80
function l(level)
80
81
   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()
81
90
end
 
 
b'\\ No newline at end of file'