mirror of
https://github.com/Steffo99/pineapple-surf.git
synced 2024-11-29 03:04:17 +00:00
14 lines
211 B
GDScript3
14 lines
211 B
GDScript3
|
extends AudioStreamPlayer3D
|
||
|
|
||
|
|
||
|
var rng: RandomNumberGenerator
|
||
|
|
||
|
|
||
|
func _ready():
|
||
|
rng = RandomNumberGenerator.new()
|
||
|
rng.randomize()
|
||
|
|
||
|
|
||
|
func play_with_random_pitch():
|
||
|
pitch_scale = rng.randf_range(0.3, 1.0)
|
||
|
play()
|