integrated sprites
This commit is contained in:
8
game.lua
8
game.lua
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user