extends AnimatedSprite2D

@export var explosion_sound: AudioStream = null


func _ready() -> void:
	NoiseSound.load_and_play(explosion_sound, 0.0, true)
	animation_finished.connect(queue_free)
	RideManager.get_instance().distance_changed.connect(_on_distance_changed)


func _on_distance_changed(pixels: int) -> void:
	global_position.y += pixels
