summaryrefslogtreecommitdiffhomepage
path: root/not/World.lua
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-09-02 22:30:32 +0200
committerAki <nthirtyone@gmail.com>2017-09-02 22:30:32 +0200
commit2757fa1de92f2eff8be080721a7f777086afa072 (patch)
treed3564407bdd589304efbdd2dd93a3d9e21c656cd /not/World.lua
parent27a1d0de613a360912d1e9f3a5db7ab044a0b450 (diff)
downloadroflnauts-2757fa1de92f2eff8be080721a7f777086afa072.zip
roflnauts-2757fa1de92f2eff8be080721a7f777086afa072.tar.gz
roflnauts-2757fa1de92f2eff8be080721a7f777086afa072.tar.bz2
Separated platforms' configs from maps' configs
Diffstat (limited to 'not/World.lua')
-rw-r--r--not/World.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/not/World.lua b/not/World.lua
index 7d40476..d4d933f 100644
--- a/not/World.lua
+++ b/not/World.lua
@@ -52,7 +52,8 @@ function World:loadMap (name)
self.map = map()
-- Platforms
for _,platform in pairs(self.map.platforms) do
- self:createPlatform(platform.x, platform.y, platform.shape, platform.sprite, platform.animations)
+ local config = love.filesystem.load(string.format("config/platforms/%s.lua", platform.config))()
+ self:createPlatform(platform.x, platform.y, config.shape, config.sprite, platform.animations)
end
-- Decorations
for _,decoration in pairs(self.map.decorations) do