1
Fork 0
mirror of https://github.com/Cookie-CHR/OfficeMadness-LD51.git synced 2024-11-24 23:54:19 +00:00
office-madness/Music/Music.gd
Cookie-CHR 0a48efa388 ⚙️ First Upload
2022-10-03 00:46:29 +02:00

19 lines
398 B
GDScript

extends AudioStreamPlayer
var curr_music = "res://Music/Menu/Suonatore di Liuto.mp3"
# Called when the node enters the scene tree for the first time.
func _ready():
volume_db = -2
if(not Muter.mute):
play()
func change_music (new_music):
if new_music != "":
if curr_music != new_music:
curr_music = new_music
stop()
set_stream(load(new_music))
if(not Muter.mute):
play()