/ld28

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

« back to all changes in this revision

Viewing changes to clone.lua

  • Committer: Josh C
  • Date: 2013-12-14 20:49:46 UTC
  • Revision ID: josh@9ix.org-20131214204946-x376m4m055wrwfrz
collide w/ the map

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Clone = Tile:extend {
2
 
   image = 'data/player.png',
 
1
local dirs = {'left', 'right', 'up', 'down'}
 
2
 
 
3
Clone = Fill:extend {
 
4
   fill = {255,0,0},
 
5
   width = 16, height = 16,
 
6
   queue = deque.new(),
3
7
   onNew = function(self)
4
8
              self.direction = dirs[math.random(1,4)]
5
9
           end,
26
30
                                       util.dirToXY(self.direction),
27
31
                                       - util.dirToPosNeg(self.direction))
28
32
                  end
29
 
 
30
 
                  if other == the.player then
31
 
                     self.image = 'data/player.png'
32
 
                  end
33
33
               end
34
34
}
 
 
b'\\ No newline at end of file'