=== added file 'boat.lua'
--- boat.lua 1970-01-01 00:00:00 +0000
+++ boat.lua 2013-04-29 00:57:59 +0000
@@ -0,0 +1,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
+}
\ No newline at end of file
=== added file 'data/boat.png'
Binary files data/boat.png 1970-01-01 00:00:00 +0000 and data/boat.png 2013-04-29 00:57:59 +0000 differ
=== modified file 'data/realfairy.svg'
--- data/realfairy.svg 2013-04-29 00:35:28 +0000
+++ data/realfairy.svg 2013-04-29 00:57:59 +0000
@@ -14,7 +14,7 @@
id="svg9067"
version="1.1"
inkscape:version="0.48.3.1 r9886"
- sodipodi:docname="New document 64">
+ sodipodi:docname="realfairy.svg">
+ y="1036.3943"
+ inkscape:export-filename="/home/josh/code/game/ld26/data/realfairy.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ y="1037.9307"
+ inkscape:export-filename="/home/josh/code/game/ld26/data/realfairy.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
=== modified file 'data/shore.svg'
--- data/shore.svg 2013-04-29 00:42:39 +0000
+++ data/shore.svg 2013-04-29 00:57:59 +0000
@@ -49,7 +49,7 @@
image/svg+xml
-
+
@@ -74,7 +74,7 @@
sodipodi:cy="346.45172"
sodipodi:rx="55.558392"
sodipodi:ry="55.558392"
- d="m 663.67021,346.45172 c 0,30.68405 -24.87434,55.55839 -55.55839,55.55839 -30.68406,0 -55.5584,-24.87434 -55.5584,-55.55839 0,-30.68405 24.87434,-55.55839 55.5584,-55.55839 30.68405,0 55.55839,24.87434 55.55839,55.55839 z"
+ d="m 663.67021,346.45172 a 55.558392,55.558392 0 1 1 -111.11679,0 55.558392,55.558392 0 1 1 111.11679,0 z"
transform="translate(9.0913729,247.30121)" />
+ style="display:none">
+ inkscape:label="boat"
+ inkscape:export-filename="/home/josh/code/game/ld26/data/boat.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
=== modified file 'levels.lua'
--- levels.lua 2013-04-29 00:35:28 +0000
+++ levels.lua 2013-04-29 00:57:59 +0000
@@ -22,7 +22,7 @@
Player:new{x = 145, y = 133,
--minY = 133, maxY = 133,
image = 'data/shore-player.png'},
- Tile:new{image = 'data/shore-fg.png'},
+ --Tile:new{image = 'data/shore-fg.png'},
Transition:new{x = 10, y = 133, target = 'forest1',
targetX = 735, targetY = 370},
fairytarget
=== modified file 'main.lua'
--- main.lua 2013-04-29 00:35:28 +0000
+++ main.lua 2013-04-29 00:57:59 +0000
@@ -17,6 +17,7 @@
require 'gatetrigger'
require 'fairyactivator'
require 'realfairy'
+require 'boat'
require 'svg_levels'
@@ -74,7 +75,7 @@
end
--the.inventory:add(Flag:new())
- the.inventory:add(Fairy:new())
+ --the.inventory:add(Fairy:new())
end,
onUpdate = function (self, dt)
if the.keys:justPressed('escape') then
=== modified file 'svg_levels.lua'
--- svg_levels.lua 2013-04-29 00:42:39 +0000
+++ svg_levels.lua 2013-04-29 00:57:59 +0000
@@ -135,7 +135,7 @@
MaybeDisplacer:new{
- x = -21.898781, y = 483.936460,
+ x = -21.898781, y = 493.936460,
width = 329.576660, height = 15.329147
},
@@ -169,6 +169,11 @@
width = 19.192898, height = 16.162441,
},
+
+Boat:new{
+ x = 231.032140, y = 523.354250,
+},
+
},
lakeroad = {
=== modified file 'svg_levels.py'
--- svg_levels.py 2013-04-29 00:35:28 +0000
+++ svg_levels.py 2013-04-29 00:57:59 +0000
@@ -140,6 +140,17 @@
},
""" % (x,y,w,h)
+ sel = CSSSelector('svg|rect[ink|label="boat"]', ns)
+ for e in sel(t):
+ x, y = float(e.get('x')), float(e.get('y'))
+ #w, h = float(e.get('width')), float(e.get('height'))
+
+ print """
+Boat:new{
+ x = %f, y = %f,
+},
+""" % (x,y)
+
sel = CSSSelector('svg|rect[ink|label="troll"]', ns)
for e in sel(t):
x, y = float(e.get('x')), float(e.get('y'))