/ld26

To get this branch, use:
bzr branch /bzr/ld26
45 by Josh C
boat
1
Boat = Tile:extend {
2
   image = 'data/boat.png',
3
   carryingPlayer = false,
4
   onUpdate = function (self, dt)
5
                 if self.carryingPlayer then
6
                    the.player.x = self.x + 20
7
                    the.player.y = self.y - 5
8
                 end
9
              end,
10
   onCollide = function (self, other, xOl, yOl)
11
                  self.carryingPlayer = true
12
                  the.player.canMove = false
13
14
                  local v = the.app.view
15
                  v.tween:start(self, 'x', 850, 10)
16
17
                  local te = Text:new{
18
                     y = 300, width = the.app.width, align = 'center',
19
                     font = 25,
20
                     text = "The End" }
21
22
                  v:add(te)
23
                  --v.tween:start(te.tint, 4, 255, 5)
24
               end
25
}