/ld26

To get this branch, use:
bzr branch http://9ix.org/bzr/ld26

« back to all changes in this revision

Viewing changes to gatetrigger.lua

  • Committer: Josh C
  • Date: 2013-04-27 17:09:45 UTC
  • Revision ID: josh@9ix.org-20130427170945-tdycmqprr0vu17ar
load a level, move a player around

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
GateTrigger = Sprite:extend {
2
 
   onNew = function(self)
3
 
              --print(self.x, self.y, self.width, self.height)
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
 
}
 
 
b'\\ No newline at end of file'