21 lines
323 B
GDScript
21 lines
323 B
GDScript
extends Area2D
|
|
|
|
@export var effect = "alert"
|
|
signal areatrigger(effect, Object)
|
|
|
|
func _on_area_entered(area):
|
|
print("area entered")
|
|
|
|
|
|
func _on_area_exited(area):
|
|
print("area exited")
|
|
|
|
|
|
func _on_body_entered(body):
|
|
print("body entered")
|
|
areatrigger.emit(effect, body)
|
|
|
|
|
|
func _on_body_exited(body):
|
|
print("body exited")
|