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:
parent
0566eb4041
commit
ce14314ebd
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue