extends Plant

@onready var all_ufos = $"../../UFOs"

func _ready():
    super()
    connect("shoot", _on_shoot)
 
func _process(delta):
    super(delta)
    
func _on_shoot(_victim):
    for ufo in all_ufos.get_children():
        if ufo.get_global_position().distance_to(get_global_position()) <= attack_range:
            ufo.deal_damage(attack_damage)
 
