martian-mike/scripts/trap.gd

10 lines
190 B
GDScript3
Raw Normal View History

2024-11-02 08:07:54 +01:00
extends Node
2024-11-16 23:26:08 +01:00
class_name Trap
2024-11-02 08:07:54 +01:00
signal touched_player
func _on_area_2d_body_entered(body: Node2D) -> void:
if body is Player:
touched_player.emit()
pass # Replace with function body.