Attempting to refactor the previously working self contained equidistent

code in the player.gd.
This commit is contained in:
Henry 2026-04-06 12:46:36 +01:00
parent 5d2efe9983
commit d419635d7f
15 changed files with 153 additions and 46 deletions

View file

@ -16,7 +16,7 @@ func tick(delta: float):
# Check to see if there's a player to move
if player == null: return
# Calculate ship to bullet displacemnt
# Calculate ship to bullet displacement
player.ship_displacement = player.position.y - player.previous_position.y
player.travel += abs(weapon_component.bullet_data.speed) * delta + (player.ship_displacement)
player.travel = clamp(player.travel, 0, 1.9 * weapon_component.bullet_data.projectile_spacing)