/ld26

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

« back to all changes in this revision

Viewing changes to boat.lua

  • Committer: Josh C
  • Date: 2013-04-29 01:28:50 UTC
  • Revision ID: josh@9ix.org-20130429012850-7p3xcwad2er011wo
remove someone who isn't there

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
}
 
 
b'\\ No newline at end of file'