buckshotroulette-decomp/ShellDropManager.gd

10 lines
267 B
GDScript3
Raw Normal View History

2024-01-20 12:17:43 +00:00
class_name ShellDropManager extends Node
@export var speaker : AudioStreamPlayer2D
@export var soundArray : Array[AudioStream]
func PlayShellDropSound():
var randindex = randi_range(0, soundArray.size() - 1)
speaker.stream = soundArray[randindex]
speaker.play()