/ld26

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

« back to all changes in this revision

Viewing changes to fairyactivator.lua

  • Committer: Josh C
  • Date: 2013-04-28 23:55:40 UTC
  • Revision ID: josh@9ix.org-20130428235540-wamoh325zjypaf06
dragon flag special case

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
FairyActivator = Sprite:extend {
2
 
   onCollide = function(self, other, xOl, yOl)
3
 
                  self:displace(other)
4
 
 
5
 
                  if the.inventory.items['fairy'] then
6
 
                     the.inventory:remove('fairy')
7
 
 
8
 
                     local v = the.app.view
9
 
                     local f = RealFairy:new{x = the.player.x, y = the.player.y}
10
 
                     v:add(f)
11
 
 
12
 
                     the.player.canMove = false
13
 
 
14
 
                     v.tween:start(f, 'x', fairytarget.x, 5)
15
 
                     v.tween:start(f, 'y', fairytarget.y, 5)
16
 
 
17
 
                  end
18
 
               end
19
 
}
 
 
b'\\ No newline at end of file'