walljumps

This commit is contained in:
binarycat
2022-02-26 15:12:25 -05:00
committed by lustlion
parent 4efc99659c
commit e9754dc1dd
3 changed files with 15 additions and 1 deletions

View File

@@ -158,7 +158,8 @@ function Entity:getBoundingBox(animation,top,left,bottom,right)
self.boxCollision.to.y = animation.imgs[1]:getHeight()/2 + bottom
end
-- returns true if theres a collision at that point. also marks collisioned tile as collision true
-- checks if the the reciever would collide with an object if it was positioned at the given point.
-- also marks collisioned tile as collision true
function Entity:isCollidingAt(x,y,object)
for _, collision in pairs(object) do
if collision.disable then