/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 22:13:30 UTC
  • Revision ID: josh@9ix.org-20130428221330-duv67kmceabcitda
troll

Show diffs side-by-side

added added

removed removed

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