modules/world: floor actor2D position when drawing it

This commit is contained in:
Kazhnuz 2019-04-28 09:22:31 +02:00
parent dcfa657f64
commit 3ce567b113

View file

@ -121,8 +121,9 @@ function Actor2D:draw()
end end
function Actor2D:drawHitbox() function Actor2D:drawHitbox()
local x, y = math.floor(self.x), math.floor(self.y)
love.graphics.setColor(self.debug.r, self.debug.g, self.debug.b, 1) love.graphics.setColor(self.debug.r, self.debug.g, self.debug.b, 1)
utils.graphics.box(self.x, self.y, self.w, self.h) utils.graphics.box(x, y, self.w, self.h)
end end
return Actor2D return Actor2D