extends Node

@export var Virus : PackedScene
@export var spawn_distance = 1000

var player

func _ready():
	self.player = get_node("../Player")

func _process(delta):
	pass

func _on_timer_timeout():
	var virus = Virus.instantiate()
	var direction = Vector2.RIGHT.rotated(randf_range(0, 2*PI))
	virus.position = player.position + direction * spawn_distance
	add_child(virus)
