/ld26

To get this branch, use:
bzr branch http://9ix.org/bzr/ld26
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Displacer = Fill:extend{
   fill = {0, 255, 255},
   visible = false,
   onUpdate = function(self, dt)
                self.visible = DEBUG and the.console.visible
             end,
   onCollide = function(self, other, xOl, yOl)
                 if other == the.player then --sanity check
                    self:displace(other)
                 end
              end
}

MaybeDisplacer = Fill:extend{
   fill = {0, 255, 255},
   visible = false,
   onUpdate = function(self, dt)
                self.visible = DEBUG and the.console.visible
             end,
   onCollide = function(self, other, xOl, yOl)
                  --print('col')
                  if the.player.canMove then
                     self:displace(other)
                  end
               end
}