class_name ComicPlayer
extends AnimationPlayer

var _next: = 0


func _process(_delta: float) -> void:
	if Input.is_action_just_pressed("advance_comic"):
		if get_animation_list().size() > _next:
			play(str(_next))
			_callback_next(_next)
			_next += 1
		else:
			_callback_finished()


func _callback_next(_index: int) -> void:
	pass


func _callback_finished() -> void:
	pass
