first_anniversary_godot_jam/scripts/Library/Actions/TriggerOnCollision.gd

10 lines
227 B
GDScript

class_name TriggerOnCollision extends TriggerBase
export(NodePath) var collision_area
func _ready():
collision_area.connect("body_entered", self, "_on_body_entered")
func _on_body_entered(body: Node):
triggerAction(body)