/ld28

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

« back to all changes in this revision

Viewing changes to main.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:
47
47
                 if the.player.moved then
48
48
                    -- this should encapsulate
49
49
 
50
 
                    the.clones:collide(the.player)
51
 
                    the.goalPerson:collide(the.player)
52
 
 
53
50
                    the.goalPerson:doMove()
54
51
 
55
52
                    for _, np in ipairs(the.clones.sprites) do
56
53
                       np:doMove()
57
54
                    end
58
55
 
59
 
                    -- yeah, again.  once for flip, twice for displace
60
 
                    the.clones:collide(the.player)
61
 
 
62
56
                    the.clones:collide(self.map)
63
57
                    the.player:collide(self.map)
64
58
                    the.goalPerson:collide(self.map)
65
59
 
66
60
                    the.clones:collide()
 
61
                    the.clones:collide(the.player)
67
62
 
68
63
                    if math.random(1,5) == 1 then
69
 
                       local c = the.clones.sprites[math.random(the.clones:count())]
70
 
                       if not c.cured then
71
 
                          c.image = 'data/goal.png'
72
 
                       end
 
64
                       the.clones.sprites[math.random(the.clones:count())].fill = {0,255,0}
73
65
                    end
74
66
 
75
67
                    the.player.moved = false