diff options
Diffstat (limited to 'dicaprio.gd')
-rw-r--r-- | dicaprio.gd | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/dicaprio.gd b/dicaprio.gd index 3750015..bddbe40 100644 --- a/dicaprio.gd +++ b/dicaprio.gd @@ -17,8 +17,11 @@ func _physics_process(_delta: float) -> void: func _on_area_entered(area: Area2D) -> void: - if area.type() == "arrow": - area.damage(self) + match area.type(): + "arrow": + area.damage(self) + "dicaprio": + position -= (area.position - position).normalized() * 8 func damage(x: float) -> void: |