From cca4d9c1bf4033c79e4bd61a257c6ea02557524c Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 19 Mar 2017 04:19:59 +0100 Subject: Moving draw away to abstract classes --- not/Decoration.lua | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'not/Decoration.lua') 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 -- cgit v1.1