fix: use right height for Battle-like blocks

This commit is contained in:
Kazhnuz 2019-07-27 15:40:19 +02:00
parent 76336046d4
commit 87a133a74b
2 changed files with 5 additions and 5 deletions

View file

@ -27,7 +27,7 @@ function BattleMap:addBlock(x, y, w, h, top, bottom)
if (self.assets.images[bottom] == nil) then
self.assets:addImage(bottom, self.directory .. bottom .. ".png")
end
self.world.obj.collisions["textured"](self.world, x*2, y, 0, w*2, h, 64, top, bottom)
self.world.obj.collisions["textured"](self.world, x*2, y, 0, w*2, h, 48, top, bottom)
end
function BattleMap:getDimensions()

View file

@ -10,10 +10,10 @@ end
function TestMap:loadCollisions()
self.world:newCollision("wall", 0, 0, -16, 8*64, 8*32, 16)
self.world:newCollision("wall", 64*1, 32*1, 0, 64*1, 32*3, 64)
self.world:newCollision("wall", 64*4, 32*1, 0, 64*3, 32*1, 64)
self.world:newCollision("wall", 64*6, 32*5, 0, 64*1, 32*3, 64)
self.world:newCollision("wall", 64*1, 32*7, 0, 64*3, 32*1, 64)
self.world:newCollision("wall", 64*1, 32*1, 0, 64*1, 32*3, 48)
self.world:newCollision("wall", 64*4, 32*1, 0, 64*3, 32*1, 48)
self.world:newCollision("wall", 64*6, 32*5, 0, 64*1, 32*3, 48)
self.world:newCollision("wall", 64*1, 32*7, 0, 64*3, 32*1, 48)
end
function TestMap:getDimensions()