Frontier-of-Hell/scripts/base/base.gd
2023-10-08 17:51:55 +07:00

9 lines
205 B
GDScript

extends Area2D
signal enemy_entered_base(enemy)
func _on_body_entered(body):
if body.is_in_group("Enemy"):
var enemy = body.get_parent()
enemy_entered_base.emit(enemy)
body.get_parent().destroy()