16 lines
400 B
GDScript
16 lines
400 B
GDScript
extends AudioStreamPlayer
|
|
|
|
@export var multiply = .25
|
|
@export var loop = false
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready():
|
|
pass # Replace with function body.
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(delta):
|
|
if loop && !playing:
|
|
play()
|
|
volume_db = linear_to_db(db_to_linear(Globals.music_volume) * multiply)
|