bugfix and slide animation

- bugfix for hook swing not taking in consideration the length of rope
- bugfix for player hitbox size
- bugfix for fairy flight control system FCS
- added slide animation for wall slide and wall jump
This commit is contained in:
lustlion
2022-03-09 15:54:26 +01:00
parent 9ada88f4f5
commit 6e76607030
10 changed files with 46 additions and 14 deletions

View File

@@ -10,7 +10,7 @@ function Fairy:new(x,y)
o.range = 20
o.vision_range = 120
o.target = {x = x, y = y}
o.hover_distance = 60
o.hover_distance = 40
-- animations
o.body = Animation:new(animation.fairy.flying)
@@ -41,8 +41,8 @@ function Fairy:doLogic()
local below = 1
while not isThereObjectAt(
self.target.x,
self.target.y + below * game.scale,
self.pos.x,
self.pos.y + below * game.scale,
LoadedObjects.Collisions
) do
below = below + 1
@@ -50,8 +50,8 @@ function Fairy:doLogic()
end
local top = 1
while not isThereObjectAt(
self.target.x,
self.target.y - top * game.scale,
self.pos.x,
self.pos.y - top * game.scale,
LoadedObjects.Collisions
) do
top = top + 1