/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 18:51:02 UTC
  • Revision ID: josh@9ix.org-20130428185102-2gekwj8pzvlnwvhb
collision tweaks

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
                   }
52
52
                end
53
53
   },
54
 
   village = {
55
 
      objects = function() return {
56
 
                      Tile:new{image = 'data/village-bg.png'},
57
 
                      Player:new{x = 121, y = 440,
58
 
                                 image = 'data/village-player.png'},
59
 
                   }
60
 
                end
61
 
   },
 
54
   -- village = {
 
55
   --    objects = function() return {
 
56
   --                    Tile:new{image = 'data/village-bg.png'},
 
57
   --                    Player:new{x = 121, y = 440,
 
58
   --                               image = 'data/village-player.png'},
 
59
   --                 }
 
60
   --              end
 
61
   -- },
62
62
   bridge = {
63
63
      objects = function() return {
64
64
                      Tile:new{image = 'data/bridge-bg.png'},
74
74
   level = 'shore', --default level
75
75
   onNew = function (self)
76
76
              --print('loading level: '..self.level)
 
77
              if not levels[self.level] then
 
78
                 error('no such level: '..self.level)
 
79
              end
77
80
              for _, obj in ipairs(levels[self.level].objects()) do
78
81
                 self:add(obj)
79
82
              end