/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 05:19:04 UTC
  • Revision ID: josh@9ix.org-20130428051904-7j0sucv9tm8rqdkf
inventory (and a flower)

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
require 'player'
10
10
require 'transition'
11
11
require 'displacer'
 
12
require 'inventory'
 
13
require 'flower'
 
14
 
12
15
require 'svg_levels'
13
16
 
14
17
levels = {
31
34
                      Transition:new{x = 10, y = 133, target = 'forest1',
32
35
                                     targetX = 735, targetY = 370}
33
36
                   } end
 
37
   },
 
38
   lake = {
 
39
      objects = function() return {
 
40
                      Tile:new{image = 'data/lake-bg.png'},
 
41
                      Player:new{x = 540, y = 266,
 
42
                                 image = 'data/lake-player.png'},
 
43
                   }
 
44
                end
 
45
   },
 
46
   village = {
 
47
      objects = function() return {
 
48
                      Tile:new{image = 'data/village-bg.png'},
 
49
                      Player:new{x = 121, y = 440,
 
50
                                 image = 'data/village-player.png'},
 
51
                   }
 
52
                end
34
53
   }
35
54
}
36
55
 
45
64
                 self:add(obj)
46
65
              end
47
66
 
 
67
              self:add(the.inventory)
 
68
 
48
69
              self:flash({0,0,0})
49
70
 
50
71
              --self.focus = the.player
52
73
           end,
53
74
   draw = function (self, x, y)
54
75
             View.draw(self, x, y)
55
 
             love.graphics.print('FPS:' .. love.timer.getFPS(), 20, 20)
 
76
             --love.graphics.print('FPS:' .. love.timer.getFPS(), 20, 20)
56
77
             love.graphics.print('version:' .. VERSION, 20, 570)
57
78
          end,
58
79
   onUpdate = function (self, dt)
91
112
               end
92
113
            end
93
114
}
 
115
 
 
116
-- for accessing from debug console
 
117
function l(level)
 
118
   the.app.view = GameView:new{level = level}
 
119
end
 
 
b'\\ No newline at end of file'