scenes/levels: use the contained asset for debris images
This commit is contained in:
parent
144f0ec89e
commit
84882665d0
|
@ -50,8 +50,7 @@ end
|
|||
function Debris:draw(dt)
|
||||
local rotation = math.floor(self.rotation/45)*45
|
||||
drawx, drawy = self:getCenter()
|
||||
assets.sprites["debris"]:draw(1, drawx, drawy, rotation,
|
||||
1, 1, 4, 4)
|
||||
love.graphics.draw(self.level.assets.images["debris"], drawx, drawy, rotation, 1, 1, 4, 4)
|
||||
end
|
||||
|
||||
return Debris
|
||||
|
|
|
@ -91,8 +91,7 @@ function Level:loadSprites()
|
|||
self.assets:addTileset("weapon", "assets/sprites/weapon")
|
||||
self.assets:addTileset("block", "assets/sprites/items/block")
|
||||
|
||||
assets:addSprite("debris", 8, 8)
|
||||
assets.sprites["debris"]:newAnimation(1, 1, 0.08)
|
||||
self.assets:addImage("debris", "assets/sprites/debris.png")
|
||||
|
||||
assets:addSprite("lifeicons", 16, 16, "pigs/")
|
||||
assets.sprites["lifeicons"]:newAnimation(1, 1, 0.08)
|
||||
|
|
Loading…
Reference in New Issue