Feat/2 weapons foundation #6

Merged
Dotts merged 30 commits from feat/2-weapons-foundation into main 2026-06-04 22:22:16 -07:00
Showing only changes of commit 5c2d648801 - Show all commits
+11 -8
View File
@@ -61,15 +61,18 @@ func exit() -> void:
func update(delta: float) -> void:
elapsed += delta
if elapsed > params.dash_duration:
# Transition to air with preserved velocity (slight decay)
machine.player.velocity = direction * _exit_speed * 0.85
machine.switch_to("air")
if machine.player.is_on_floor():
machine.on_ground = true
machine.switch_to("ground")
else:
machine.switch_to("air")
return
# Maintain dash velocity — no gravity, no friction
machine.player.velocity = direction * _exit_speed
machine.player.move_and_slide()
# Maintain dash velocity
var vel = direction * _exit_speed
if machine.player.is_on_floor():
machine.on_ground = true
machine.switch_to("ground")
vel.y = -0.5 # Snap to floor to handle ramps
machine.player.velocity = vel
machine.player.move_and_slide()