/ld26

To get this branch, use:
bzr branch /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

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