diff options
author | Aki <nthirtyone@gmail.com> | 2016-05-13 21:39:50 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2016-05-13 21:39:50 +0200 |
commit | 8d51222d41a348867706ceaec80d36e017a8d7ab (patch) | |
tree | 60a17c31c7f08505def499c2aaa57ce3c241b213 /ground.lua | |
parent | 6c1b6bdb22449c15450bd61cb1bf75a323cb40b9 (diff) | |
download | roflnauts-8d51222d41a348867706ceaec80d36e017a8d7ab.zip roflnauts-8d51222d41a348867706ceaec80d36e017a8d7ab.tar.gz roflnauts-8d51222d41a348867706ceaec80d36e017a8d7ab.tar.bz2 |
Scaling
Diffstat (limited to 'ground.lua')
-rw-r--r-- | ground.lua | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) |