class_name MyMenuButton
extends Button

@export
var level: PackedScene

func _ready() -> void:
	connect("button_down", on_clicked)
	await get_tree().create_timer(randf()).timeout
	%AnimationPlayer.play("wiggle")

func on_clicked():
	Globals.levelLoader.load_level(level)
