Skip to content

Commit 12a60c1

Browse files
committed
fixup! Repel mechanic: Make it work with any Node2D
1 parent 2b85c96 commit 12a60c1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scenes/game_elements/props/projectile/components/projectile.gd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,10 @@ func _on_body_entered(body: Node2D) -> void:
155155

156156
## Called from the Repel component when this body
157157
## enters the repel area.
158-
func got_repelled(direction: Vector2) -> void:
158+
func got_repelled(repel_direction: Vector2) -> void:
159159
add_small_fx()
160160
duration_timer.start()
161-
var hit_vector: Vector2 = direction * hit_speed
161+
var hit_vector: Vector2 = repel_direction * hit_speed
162162
hit_sound.play()
163163
animated_sprite_2d.speed_scale = 2
164164
if _trail_particles:

0 commit comments

Comments
 (0)