summaryrefslogtreecommitdiffhomepage
path: root/ground.lua
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2016-05-13 21:39:50 +0200
committerAki <nthirtyone@gmail.com>2016-05-13 21:39:50 +0200
commit8d51222d41a348867706ceaec80d36e017a8d7ab (patch)
tree60a17c31c7f08505def499c2aaa57ce3c241b213 /ground.lua
parent6c1b6bdb22449c15450bd61cb1bf75a323cb40b9 (diff)
downloadroflnauts-8d51222d41a348867706ceaec80d36e017a8d7ab.zip
roflnauts-8d51222d41a348867706ceaec80d36e017a8d7ab.tar.gz
roflnauts-8d51222d41a348867706ceaec80d36e017a8d7ab.tar.bz2
Scaling
Diffstat (limited to 'ground.lua')
-rw-r--r--ground.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/ground.lua b/ground.lua
index 23b4dcf..d5fd46e 100644
--- a/ground.lua
+++ b/ground.lua
@@ -27,14 +27,14 @@ function Ground:new (world, x, y, shape, sprite)
end
-- Draw of `Ground`
-function Ground:draw (offset_x, offset_y, debug)
+function Ground:draw (offset_x, offset_y, scale, debug)
-- defaults
local offset_x = offset_x or 0
local offset_y = offset_y or 0
local debug = debug or false
-- sprite draw
love.graphics.setColor(255,255,255,255)
- love.graphics.draw(self.sprite, self.body:getX()-math.ceil(self.sprite:getWidth()/2)+offset_x, self.body:getY()+offset_y)
+ love.graphics.draw(self.sprite, (self.body:getX()-math.ceil(self.sprite:getWidth()/2)+offset_x)*scale, (self.body:getY()+offset_y)*scale, 0, scale, scale)
-- debug draw
if debug then
love.graphics.setColor(220, 220, 220, 100)