/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-06 22:55:23 UTC
  • Revision ID: josh@9ix.org-20140706225523-5dnau1lu753yt0t4
update build.sh for love 0.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
Goal = Tile:extend{
2
2
   image = 'data/goal.png',
3
 
   velocity = {rotation = 2}
 
3
   velocity = {rotation = 2},
 
4
   ping = love.audio.newSource('data/Pickup_Coin7.wav', 'static'),
 
5
   onCollide = function(self, other)
 
6
                  love.audio.play(self.ping)
 
7
                  the.goalsAchieved = the.goalsAchieved + 1
 
8
 
 
9
                  self:die()
 
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
 
16
                  the.view.objects:remove(self)
 
17
 
 
18
                  if the.goalsAchieved == 4 then
 
19
                     WinView:new():activate()
 
20
                  end
 
21
               end
4
22
}
 
 
b'\\ No newline at end of file'