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
|
Boat = Tile:extend {
image = 'data/boat.png',
carryingPlayer = false,
onUpdate = function (self, dt)
if self.carryingPlayer then
the.player.x = self.x + 20
the.player.y = self.y - 5
end
end,
onCollide = function (self, other, xOl, yOl)
self.carryingPlayer = true
the.player.canMove = false
local v = the.app.view
v.tween:start(self, 'x', 850, 10)
local te = Text:new{
y = 300, width = the.app.width, align = 'center',
font = 25,
text = "The End" }
v:add(te)
--v.tween:start(te.tint, 4, 255, 5)
end
}
|