breadwinner/entities/usable/music_player.gd
Balogh Krisztián 18d9a149a3 added main menu
when you quit the game, it basically crashes and the audio lags for now.
changable audio is still not fixed, the child spatial_audio3d still plays too loud.
2026-08-16 22:38:23 +02:00

13 lines
325 B
GDScript

extends Node3D
@onready var audio_player: ChangableAudioStreamPlayer3D = $ChangableAudioStreamPlayer3D
var is_playing: bool = false
func toggle():
is_playing = !is_playing
audio_player.do_play(3.5)
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
%Button.pressed.connect(toggle)