In Godot, I hope to display the buttons in the scene one by one after playing the animation

Godot Version

4.2.2

Question

In Godot, I hope to display the buttons in the scene one by one after playing the animation

it is my code:
extends Control
@onready var Bt_container = $ColorRect/GridContainer
@onready var buttons=Bt_container.get_children()
@onready var animation_player = $“…/AnimationPlayer”

Called when the node enters the scene tree for the first time.

func _ready():
for index in buttons.size():
buttons[index].gui_input.connect(Callable(self,“_on_gui_input”).bind(index))
buttons[index].visible=false
animation_player.connect(“animation_finished”, Callable(self, “_on_animation_finished”))

Called every frame. ‘delta’ is the elapsed time since the previous frame.

func _on_gui_input(event,index):
if event is InputEventMouseButton and event.pressed:
print(“cilck”,index)
if event.button_index==MOUSE_BUTTON_LEFT:
_into(index)

func _into(index):
if index==0:
print(“bt1”)

func _on_animation_finished(anim_name):
for i in range(buttons.size()):
await show_button(buttons[i], i)

func show_button(button, delay):
# 创建一个Timer节点
var timer = Timer.new()
# 设置Timer为单次触发
timer.one_shot = true
# 设置Timer的等待时间
timer.wait_time = delay
# 将Timer添加到当前场景树
add_child(timer)
# 连接Timer的timeout信号到回调函数
timer.connect(“timeout”,self, “_on_timer_timeout”,[button])
# 启动Timer
timer.start()
# 返回一个等待Timer完成的信号
return timer.timeout_signal

func _on_timer_timeout(button: Button):
button.visible = true
button.emit_signal(“timeout”)

This is an error:
行 40:Too many arguments for “connect()” call. Expected at most 3 but received 4.
行 40:Invalid argument for “connect()” function: argument 2 should be “Callable” but is “res://sce/Theme/bt_script.gd”.
行 40:Cannot pass a value of type “String” as “int”.
行 40:Invalid argument for “connect()” function: argument 3 should be “int” but is “String”.

We could help you but please write the codes in proper format, like this:

``` Paste your codes here ```