/ld27

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

« back to all changes in this revision

Viewing changes to goal.lua

  • Committer: Josh C
  • Date: 2014-07-04 22:05:40 UTC
  • Revision ID: josh@9ix.org-20140704220540-199zzs992711al0k
android build script

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
                  the.goalsAchieved = the.goalsAchieved + 1
8
8
 
9
9
                  self:die()
10
 
                  the.view.goals[tonumber(self.map)] = nil
 
10
                  local goals = the.view.goals[tonumber(self.map)]
 
11
                  for k, v in pairs(goals) do
 
12
                     if v == self then
 
13
                        table.remove(goals, k)
 
14
                     end
 
15
                  end
11
16
                  the.view.objects:remove(self)
12
17
 
13
 
                  if the.goalsAchieved == 3 then
 
18
                  if the.goalsAchieved == 4 then
14
19
                     WinView:new():activate()
15
20
                  end
16
21
               end