2024-04-20 15:36:26 +00:00
|
|
|
class_name TriggerOnCollision extends TriggerBase
|
2024-04-20 15:17:19 +00:00
|
|
|
|
2024-04-20 15:36:26 +00:00
|
|
|
export(NodePath) var collision_area
|
2024-04-20 15:17:19 +00:00
|
|
|
|
|
|
|
func _ready():
|
2024-04-20 15:36:26 +00:00
|
|
|
collision_area.connect("body_entered", self, "_on_body_entered")
|
|
|
|
|
|
|
|
func _on_body_entered(body: Node):
|
|
|
|
triggerAction(body)
|