extends Node2D

var speed = 100
var scene
var active = true

func _ready() -> void:
	scene = self.get_parent()
	
func _process(delta: float) -> void:
	active = scene.active
	
	if active:
		self.position.y += speed*delta
	if self.position.y >= get_viewport_rect().size.y:
		scene.comets.erase(self)
		self.queue_free()
