=== added file 'data/fish.png'
Binary files data/fish.png 1970-01-01 00:00:00 +0000 and data/fish.png 2013-04-28 22:00:27 +0000 differ
=== added file 'data/fish.svg'
--- data/fish.svg 1970-01-01 00:00:00 +0000
+++ data/fish.svg 2013-04-28 22:00:27 +0000
@@ -0,0 +1,82 @@
+
+
+
+
=== modified file 'data/lake.svg'
--- data/lake.svg 2013-04-28 19:40:13 +0000
+++ data/lake.svg 2013-04-28 22:00:27 +0000
@@ -47,7 +47,7 @@
image/svg+xml
-
+
@@ -212,7 +212,7 @@
inkscape:groupmode="layer"
id="layer3"
inkscape:label="objects"
- style="display:none">
+ style="display:inline">
+
=== removed file 'flower.lua'
--- flower.lua 2013-04-28 05:19:04 +0000
+++ flower.lua 1970-01-01 00:00:00 +0000
@@ -1,14 +0,0 @@
-Flower = Tile:extend{
- image = 'data/flower32.png',
- name = 'flower',
- invTile = Tile:new{image = 'data/flower.png'},
- onNew = function(self)
- --print(self.x, self.y, self.width, self.height)
- end,
- onCollide = function(self, other, xOl, yOl)
- if other == the.player then
- the.inventory:add(self)
- the.app.view:remove(self)
- end
- end
-}
\ No newline at end of file
=== added file 'items.lua'
--- items.lua 1970-01-01 00:00:00 +0000
+++ items.lua 2013-04-28 22:00:27 +0000
@@ -0,0 +1,28 @@
+Flower = Tile:extend{
+ image = 'data/flower32.png',
+ name = 'flower',
+ invTile = Tile:new{image = 'data/flower.png'},
+ onNew = function(self)
+ --print(self.x, self.y, self.width, self.height)
+ end,
+ onCollide = function(self, other, xOl, yOl)
+ if other == the.player then
+ the.inventory:add(self)
+ the.app.view:remove(self)
+ end
+ end
+}
+
+Fish = Sprite:extend{
+ name = 'fish',
+ invTile = Tile:new{image = 'data/fish.png'},
+ onNew = function(self)
+ --print(self.x, self.y, self.width, self.height)
+ end,
+ onCollide = function(self, other, xOl, yOl)
+ if other == the.player then
+ the.inventory:add(self)
+ the.app.view:remove(self)
+ end
+ end
+}
\ No newline at end of file
=== modified file 'main.lua'
--- main.lua 2013-04-28 20:31:58 +0000
+++ main.lua 2013-04-28 22:00:27 +0000
@@ -10,8 +10,8 @@
require 'transition'
require 'displacer'
require 'inventory'
-require 'flower'
require 'levels'
+require 'items'
require 'svg_levels'
=== modified file 'svg_levels.lua'
--- svg_levels.lua 2013-04-28 21:39:48 +0000
+++ svg_levels.lua 2013-04-28 22:00:27 +0000
@@ -34,7 +34,9 @@
Transition:new{
x = 74.344025, y = 435.568510,
width = 9.620992, height = 43.731777,
- target='sheep'
+ target='sheep',
+targetX=253,
+targetY=325
},
},
@@ -358,6 +360,14 @@
targetY=487
},
+
+Fish:new{
+ x = 348.519870, y = 380.005310,
+ width = 11.818405, height = 32.500614,
+},
+
+},
+fish = {
},
foresthut = {
=== modified file 'svg_levels.py'
--- svg_levels.py 2013-04-28 05:19:04 +0000
+++ svg_levels.py 2013-04-28 22:00:27 +0000
@@ -56,6 +56,19 @@
},
""" % (x,y)
+ sel = CSSSelector('svg|rect[ink|label="fish"]', 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 """
+Fish:new{
+ x = %f, y = %f,
+ width = %f, height = %f,
+},
+""" % (x,y,w,h)
+
+
print '},'
print '}'