diff options
author | Aki <nthirtyone@gmail.com> | 2017-09-13 12:56:07 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-09-13 12:56:07 +0200 |
commit | ee0438e346d17be68a4b57dec62e7279f40bfefd (patch) | |
tree | 878115a3c22e8c6c75658bc39ea249972e2bbb04 /not | |
parent | f34ec5f8f29ce07d69104e537e87ed357abaf786 (diff) | |
download | roflnauts-ee0438e346d17be68a4b57dec62e7279f40bfefd.zip roflnauts-ee0438e346d17be68a4b57dec62e7279f40bfefd.tar.gz roflnauts-ee0438e346d17be68a4b57dec62e7279f40bfefd.tar.bz2 |
I think this should properly place animated backgrounds
Diffstat (limited to 'not')
-rw-r--r-- | not/World.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/not/World.lua b/not/World.lua index 92e9ae0..07843fe 100644 --- a/not/World.lua +++ b/not/World.lua @@ -103,9 +103,8 @@ function World:buildMap () local bg = self:createDecoration(x, y, op.background) if op.animations then bg:setAnimationsList(op.animations) - _,_,width,height = bg:getAnimation()[1]:getViewport() - width = width * getScale() - height = height * getScale() + _,_,x,y = bg:getAnimation()[1]:getViewport() + bg:setPosition(x / -2, y / -2) end bg.layer = self:addLayer(width, height) bg.layer.transformRatio = op.ratio |