/ld28

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

« back to all changes in this revision

Viewing changes to player.lua

  • Committer: Josh C
  • Date: 2013-12-15 02:20:51 UTC
  • Revision ID: josh@9ix.org-20131215022051-kyqldojzgu2xxcg8
moving goal, clones turning green...

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Player = Tile:extend {
2
 
   image = 'data/player.png',
 
1
Player = Fill:extend {
 
2
   fill = {255,0,0},
 
3
   width = 16, height = 16,
3
4
   queue = deque.new(),
4
5
   onNew = function(self)
5
 
              local delay = {0,1,2}
6
 
              for _ = 1, delay[the.view.level] do
 
6
              for _ = 1, math.random(1,3) do
7
7
                 self.queue:push_right(dirs[math.random(1,4)])
8
8
              end
9
9
           end,
37
37
                 end
38
38
              end,
39
39
   onCollide = function(self, other)
40
 
                  if other ~= the.view.map and other ~= the.goalPerson then
 
40
                  if other ~= the.view.map then
41
41
                     --print('collision')
42
42
 
43
43
                     other:displaceDir(self,