/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-29 01:14:37 UTC
  • Revision ID: josh@9ix.org-20130429011437-wvn3k55nyedhftza
more forgiving transition

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
DEBUG = true
3
3
 
4
4
require 'zoetrope'
 
5
--inspect = require 'inspect'
5
6
 
6
7
--require 'sprite'
7
8
require 'version'
12
13
require 'inventory'
13
14
require 'levels'
14
15
require 'items'
 
16
require 'troll'
 
17
require 'gatetrigger'
 
18
require 'fairyactivator'
 
19
require 'realfairy'
 
20
require 'boat'
15
21
 
16
22
require 'svg_levels'
17
23
 
23
29
              end
24
30
              for _, obj in ipairs(levels[self.level].objects()) do
25
31
                 self:add(obj)
 
32
                 --if obj.gateup then print('ADDING GATEUP') end
26
33
              end
27
34
              for _, obj in ipairs(svg_objects[self.level]) do
28
35
                 if not the.inventory.items[obj.name] then
29
36
                    self:add(obj)
30
37
                 end
 
38
                 if obj.name == 'flag' then
 
39
                    self:add(obj)
 
40
                 end
31
41
              end
32
42
 
 
43
              --self:add(Fill:new{x=100,y=100,width=25,height=25,fill={255,255,255}})
 
44
 
33
45
              self:add(the.inventory)
34
46
 
35
47
              self:flash({0,0,0})
61
73
                 -- back off that dark overlay a bit
62
74
                 self.console.fill.fill[4] = 75
63
75
              end
 
76
 
 
77
              --the.inventory:add(Flag:new())
 
78
              --the.inventory:add(Fish:new())
64
79
           end,
65
80
   onUpdate = function (self, dt)
66
81
                 if the.keys:justPressed('escape') then