/ld26

To get this branch, use:
bzr branch http://9ix.org/bzr/ld26
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FairyActivator = Sprite:extend {
   onCollide = function(self, other, xOl, yOl)
                  self:displace(other)

                  if the.inventory.items['fairy'] then
                     the.inventory:remove('fairy')

                     local v = the.app.view
                     local f = RealFairy:new{x = the.player.x, y = the.player.y}
                     v:add(f)

                     the.player.canMove = false

                     v.tween:start(f, 'x', fairytarget.x, 5)
                     v.tween:start(f, 'y', fairytarget.y, 5):andThen(function()
                     --( --   <-- delete this
                        the.player.canMove = true
                        f:die()
                        --f.carryingPlayer = false

                        --v.tween:start(f, 'x', fairytarget2.x, 5)
                        --v.tween:start(f, 'y', fairytarget2.y, 5)
                     end)
                     -- :andThen...
                  end
               end
}