fix(levels): use the asset function to draw its texture.

Fixes a crash, as now texture aren't a drawable type anymore, but an 
asset object
This commit is contained in:
Kazhnuz 2019-06-16 17:52:24 +02:00
parent 0566eb4041
commit ce14314ebd
2 changed files with 3 additions and 1 deletions

View File

@ -15,6 +15,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- **levels:** use gamecore 0.5.0-style key handling
- **levels:** use the right drawing method for debris' texture
## Imperium-Porcorum 0.0.1

View File

@ -49,7 +49,7 @@ end
function Debris:draw(dt)
local rotation = math.floor(self.rotation/45)*45
drawx, drawy = self:getCenter()
love.graphics.draw(self.level.assets.images["debris"], drawx, drawy, rotation, 1, 1, 4, 4)
self.level.assets.images["debris"]:draw(drawx, drawy, rotation, 1, 1, 4, 4)
end
return Debris