integrated sprites

This commit is contained in:
2021-05-13 21:13:17 +02:00
parent 026bfdacc6
commit 8b04c0d30f
2 changed files with 38 additions and 8 deletions

View File

@@ -99,8 +99,8 @@ function Chu.new(x, y, debug)
input:bind(love.keyboard.getKeyFromScancode('lshift'), 'detach')
crates:init(world, magnet)
crates:spawn(x + 120, y + 400)
crates:spawn(x + 150, y + 400)
crates:spawn(x + 120, y + 400, 'small')
crates:spawn(x + 150, y + 400, 'medium')
return setmetatable(obj, {
__index = Chu
@@ -168,7 +168,9 @@ function Chu:draw()
otherPosX, otherPosY = magnet.collider:getPosition()
love.graphics.draw(assets.sprites.magnet, otherPosX, otherPosY, magnet.collider:getAngle(), 1, 1, magnet.size.width/2, magnet.size.height/2)
--world:draw()
crates:draw()
world:draw()
if self.debug then
love.graphics.setColor(255, 0, 0, .5)