/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:54:06 UTC
  • Revision ID: josh@9ix.org-20131215025406-l1gkpunh7xkmxlaq
and a player "graphic"

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)
 
62
                    the.goalPerson:collide(the.player)
67
63
 
68
64
                    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
 
65
                       the.clones.sprites[math.random(the.clones:count())].image = 'data/goal.png'
73
66
                    end
74
67
 
75
68
                    the.player.moved = false