/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: 2013-08-25 00:16:36 UTC
  • Revision ID: josh@9ix.org-20130825001636-xoivc9byo1mdx0fu
1 goal in each maze

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},
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
 
                  the.view.goals[tonumber(self.map)] = nil
11
 
                  the.view.objects:remove(self)
12
 
 
13
 
                  if the.goalsAchieved == 3 then
14
 
                     WinView:new():activate()
15
 
                  end
16
 
               end
 
3
   velocity = {rotation = 2}
17
4
}
 
 
b'\\ No newline at end of file'