Frontier-of-Hell/scripts/base/base.gd

10 lines
205 B
GDScript3
Raw Normal View History

2023-10-07 17:13:27 +02:00
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()