/ld28

To get this branch, use:
bzr branch /bzr/ld28

« back to all changes in this revision

Viewing changes to main.lua

  • Committer: Josh C
  • Date: 2013-12-15 17:23:16 UTC
  • Revision ID: josh@9ix.org-20131215172316-aqwbhh3lyik48fnh
levels.  ish.

Show diffs side-by-side

added added

removed removed

50
50
                    the.clones:collide(the.player)
51
51
                    the.goalPerson:collide(the.player)
52
52
 
53
 
                    the.goalPerson:doMove()
 
53
                    if self.level ~= 2 then
 
54
                       the.goalPerson:doMove()
 
55
                    end
54
56
 
55
57
                    for _, np in ipairs(the.clones.sprites) do
56
58
                       np:doMove()
65
67
 
66
68
                    the.clones:collide()
67
69
 
68
 
                    if math.random(1,5) == 1 then
 
70
                    if math.random(1,6) == 1 then
69
71
                       local c = the.clones.sprites[math.random(the.clones:count())]
70
 
                       if not c.cured then
 
72
                       if self.level == 3 and not c.cured then
71
73
                          c.image = 'data/goal.png'
72
74
                       end
73
75
                    end
87
89
   onRun = function (self)
88
90
              print('Version: ' .. VERSION)
89
91
 
90
 
              self.view = GameView:new()
 
92
              self.view = GameView:new{level = 1}
91
93
 
92
94
              if DEBUG then
93
95
                 self.console:watch('VERSION', 'VERSION')
 
96
                 self.console:watch('level', 'the.view.level')
94
97
 
95
98
                 -- back off that dark overlay a bit
96
99
                 self.console.fill.fill[4] = 75