extends Area2D

@export var speed = 70


func _physics_process(delta):
	var direction = Vector2.RIGHT.rotated(self.rotation)     
	self.position += direction * speed * delta

func _on_body_entered(body):
	if body.is_in_group("mobs"):
		body.take_hit()
		self.queue_free()


func _on_timer_timeout() -> void:
	self.queue_free()
