extends Node2D

var steps = [
	preload("res://sfx/step1.wav"),
	preload("res://sfx/step2.wav"),
	preload("res://sfx/step3.wav"),
	preload("res://sfx/step4.wav"),
	preload("res://sfx/step5.wav"),
	preload("res://sfx/step6.wav"),
	preload("res://sfx/step7.wav")
]
onready var hopper = $Hop
onready var walker = $Walk

func hop():
	hopper.set_pitch_scale(rand_range(0.85, 1.15))
	hopper.play()
	
func step():
	walker.set_stream(steps[randi() % steps.size()])
	walker.set_pitch_scale(rand_range(0.85, 1.15))
	walker.play()

func stop_all():
	hopper.stop()
	walker.stop()
