First_Person_Slapper/AudioSteps.gd

27 lines
578 B
GDScript3
Raw Permalink Normal View History

2022-10-11 16:32:48 -04:00
extends AudioStreamPlayer3D
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
var array = [ 21019, 54299, 81449, 107722, 133996, 158518 ]
var currStep = 0
var rng = RandomNumberGenerator.new()
# Called when the node enters the scene tree for the first time.
func _ready():
rng.randomize()
func PlayStep():
#self.stop()
#currStep = rng.randi_range(0,4)
#self.seek(currStep)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
#if (self.get_playback_position() >= currStep + 1):
# self.stop()
pass