summaryrefslogtreecommitdiffhomepage
path: root/not/World.lua
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-09-13 04:07:16 +0200
committerAki <nthirtyone@gmail.com>2017-09-13 04:07:16 +0200
commit291e9ffce1151be503f1c4550e6f4ff3230960b9 (patch)
treea1ffbd1375fe93990c2fc016b9e8da8fe9b7c4e4 /not/World.lua
parentf15ace4d5b9f62b6288a2b6750bc48159ebebe00 (diff)
downloadroflnauts-291e9ffce1151be503f1c4550e6f4ff3230960b9.zip
roflnauts-291e9ffce1151be503f1c4550e6f4ff3230960b9.tar.gz
roflnauts-291e9ffce1151be503f1c4550e6f4ff3230960b9.tar.bz2
CloudGenerator's atlas and quads are loaded from map config
Diffstat (limited to 'not/World.lua')
-rw-r--r--not/World.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/not/World.lua b/not/World.lua
index 5d46b5b..e0febb7 100644
--- a/not/World.lua
+++ b/not/World.lua
@@ -97,7 +97,11 @@ function World:buildMap ()
bg.layer = self:addLayer(width, height, op.ratio)
end
if op.clouds then
- self:insertEntity(CloudGenerator(self)):run(6, true)
+ local animations = op.animations
+ if type(animations) == "string" then
+ animations = require("config.animations." .. animations)
+ end
+ self:insertEntity(CloudGenerator(op.clouds, animations, self)):run(6, true)
end
end
end