This repository has been archived on 2025-09-12. You can view files and clone it, but cannot push or open issues or pull requests.
ld47/objects/Spikes.gd
2020-10-06 00:12:16 +02:00

9 lines
209 B
GDScript

extends Area
func _ready() -> void:
connect("body_entered", self, "on_body_entered")
func on_body_entered(body: Node) -> void:
if body.has_method("die"):
$AudioStreamPlayer3D.play()
body.die("spikes")