summaryrefslogtreecommitdiffhomepage
path: root/not/Decoration.lua
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-03-19 04:19:59 +0100
committerAki <nthirtyone@gmail.com>2017-03-19 04:19:59 +0100
commitcca4d9c1bf4033c79e4bd61a257c6ea02557524c (patch)
treed26570878c7b912a9d3be6c0d8853b315f1c89a1 /not/Decoration.lua
parent2e352657813b37d17c2215b85189f18a50c099f9 (diff)
downloadroflnauts-cca4d9c1bf4033c79e4bd61a257c6ea02557524c.zip
roflnauts-cca4d9c1bf4033c79e4bd61a257c6ea02557524c.tar.gz
roflnauts-cca4d9c1bf4033c79e4bd61a257c6ea02557524c.tar.bz2
Moving draw away to abstract classes
Diffstat (limited to 'not/Decoration.lua')
-rw-r--r--not/Decoration.lua11
1 files changed, 1 insertions, 10 deletions
diff --git a/not/Decoration.lua b/not/Decoration.lua
index 5bfc328..a57c143 100644
--- a/not/Decoration.lua
+++ b/not/Decoration.lua
@@ -23,14 +23,5 @@ function Decoration:getPosition()
return self.x, self.y
end
function Decoration:draw(offset_x, offset_y, scale)
- -- locals
- local offset_x = offset_x or 0
- local offset_y = offset_y or 0
- local scale = scale or 1
- local x, y = self:getPosition()
- -- pixel grid
- local draw_x = (math.floor(x) + offset_x) * scale
- local draw_y = (math.floor(y) + offset_y) * scale
- -- draw
- Sprite.draw(self, draw_x, draw_y, 0, scale, scale)
+ Sprite.draw(self, offset_x, offset_y, scale)
end \ No newline at end of file