summaryrefslogtreecommitdiffhomepage
path: root/not/CloudGenerator.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/CloudGenerator.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/CloudGenerator.lua')
-rw-r--r--not/CloudGenerator.lua22
1 files changed, 2 insertions, 20 deletions
diff --git a/not/CloudGenerator.lua b/not/CloudGenerator.lua
index fb1b617..3285938 100644
--- a/not/CloudGenerator.lua
+++ b/not/CloudGenerator.lua
@@ -4,28 +4,10 @@ CloudGenerator = require "not.Object":extends()
require "not.Cloud"
-local animations = {
- default = {
- [1] = love.graphics.newQuad( 1, 1, 158,47, 478,49),
- frames = 1,
- repeated = true
- },
- default2 = {
- [1] = love.graphics.newQuad(160, 1, 158,47, 478,49),
- frames = 1,
- repeated = true
- },
- default3 = {
- [1] = love.graphics.newQuad(319, 1, 158,47, 478,49),
- frames = 1,
- repeated = true
- }
-}
-
-- TODO: Allow map config to modify cloud styles: maximum cloud count, animations and atlas.
-function CloudGenerator:new (world)
+function CloudGenerator:new (atlas, animations, world)
self.world = world
- self.atlas = "assets/clouds.png"
+ self.atlas = atlas
self.quads = animations
self.count = 18
self.interval = 6