summaryrefslogtreecommitdiffhomepage
path: root/not/Platform.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/Platform.lua
parent2e352657813b37d17c2215b85189f18a50c099f9 (diff)
downloadroflnauts-cca4d9c1bf4033c79e4bd61a257c6ea02557524c.zip
roflnauts-cca4d9c1bf4033c79e4bd61a257c6ea02557524c.tar.gz
roflnauts-cca4d9c1bf4033c79e4bd61a257c6ea02557524c.tar.bz2
Moving draw away to abstract classes
Diffstat (limited to 'not/Platform.lua')
-rw-r--r--not/Platform.lua13
1 files changed, 2 insertions, 11 deletions
diff --git a/not/Platform.lua b/not/Platform.lua
index ecf0377..7dcea6c 100644
--- a/not/Platform.lua
+++ b/not/Platform.lua
@@ -55,17 +55,8 @@ end
-- Draw of `Platform`
-- TODO: see todos in `not.Sprite.draw`.
function Platform:draw (offset_x, offset_y, scale, debug)
- -- locals
- local offset_x = offset_x or 0
- local offset_y = offset_y or 0
- local scale = scale or 1
- local debug = debug or false
- 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
- -- sprite draw
- Sprite.draw(self, draw_x, draw_y, 0, scale, scale)
+ Sprite.draw(self, offset_x, offset_y, scale)
+
-- debug draw
if debug then
love.graphics.setColor(255, 69, 0, 140)