/ld26

To get this branch, use:
bzr branch /bzr/ld26
38 by Josh C
gate
1
GateTrigger = Sprite:extend {
2
   onNew = function(self)
47 by Josh C
inventory stack bug
3
              --print(self.x, self.y, self.width, self.height)
38 by Josh C
gate
4
           end,
5
   onCollide = function (self, other, xOl, yOl)
6
                    --print('collide')
7
                    if the.inventory.items['flag'] then
8
                       print('have flag')
9
10
                       gateup.visible = false
11
                       gatedown.visible = true
12
13
                       the.inventory:remove('flag')
14
                    end
15
16
                    if gateup.visible then
17
                       self:displace(other)
18
                    end
19
                 end
20
}