/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:26:28 UTC
  • Revision ID: josh@9ix.org-20130428222628-iw5am8h8mrzedutb
really basic feedback that your inventory changed

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')
60
62
                 -- back off that dark overlay a bit
61
63
                 self.console.fill.fill[4] = 75
62
64
              end
 
65
 
 
66
              --the.inventory:add(Flower:new())
63
67
           end,
64
68
   onUpdate = function (self, dt)
65
69
                 if the.keys:justPressed('escape') then
78
82
-- for accessing from debug console
79
83
function l(level)
80
84
   the.app.view = GameView:new{level = level}
 
85
end
 
86
 
 
87
function love.load(arg)
 
88
   if arg[2] then
 
89
      the.app.level = arg[2]
 
90
   end
 
91
 
 
92
   the.app:run()
81
93
end
 
 
b'\\ No newline at end of file'