extends AudioStreamPlayer

@export var ground_jump: Array[AudioStream];
@export var midair_jump: Array[AudioStream];
@export var turnback_jump: Array[AudioStream];


enum JumpKind {
	Ground = 0, 
	Turnback = 1,
	Midair = 2
}

func _on_character_body_2d_on_jump(kind: JumpKind, isOnGround: bool, isOnWall: bool):
	match kind:
		JumpKind.Ground: 
			playSfx(ground_jump)
		JumpKind.Turnback:
			playSfx(turnback_jump)
		JumpKind.Midair:
			playSfx(midair_jump)
	pass # Replace with function body.

func playSfx(sfx: Array[AudioStream]):
	stream = sfx[randi_range(0, sfx.size() - 1)]
	play()
