diff --git a/src/scenes/story/boss_fight.py b/src/scenes/story/boss_fight.py index 875a301..1b57698 100644 --- a/src/scenes/story/boss_fight.py +++ b/src/scenes/story/boss_fight.py @@ -181,7 +181,7 @@ def __initialize_world(world: World): origin=Vec2(0.5), ), smooth.Target(world[ShieldPos]), - Velocity(500 * world[Delta]), + Velocity(500), Player(), ) @@ -211,17 +211,29 @@ def __move(world: World): for entity in world.query(Sprite, Velocity): for key in held: if key in ("up", "z"): - if s_pos.y - 45.5 - entity[Velocity] > world[FightBox].p1[1]: - s_pos.y -= entity[Velocity] + if ( + s_pos.y - 45.5 - entity[Velocity] * world[Delta] + > world[FightBox].p1[1] + ): + s_pos.y -= entity[Velocity] * world[Delta] if key in ("down", "s"): - if s_pos.y + 45.5 + entity[Velocity] < world[FightBox].p2[1]: - s_pos.y += entity[Velocity] + if ( + s_pos.y + 45.5 + entity[Velocity] * world[Delta] + < world[FightBox].p2[1] + ): + s_pos.y += entity[Velocity] * world[Delta] if key in ("left", "q"): - if s_pos.x - 37 - entity[Velocity] > world[FightBox].p1[0]: - s_pos.x -= entity[Velocity] + if ( + s_pos.x - 37 - entity[Velocity] * world[Delta] + > world[FightBox].p1[0] + ): + s_pos.x -= entity[Velocity] * world[Delta] if key in ("right", "d"): - if s_pos.x + 37 + entity[Velocity] < world[FightBox].p2[0]: - s_pos.x += entity[Velocity] + if ( + s_pos.x + 37 + entity[Velocity] * world[Delta] + < world[FightBox].p2[0] + ): + s_pos.x += entity[Velocity] * world[Delta] entity[smooth.Target] = s_pos