breadwinner/entities/usable/music_player.gd
Balogh Krisztián c1a22d43a9 changableaudiosreamplayer3d partial fix
it does not do what it's supposed to
for some reason when easy_audio is turned off it sounds like it plays the audio 212 times, or with wrong effect parameters. but atleast now it doesnt crash
2026-08-16 00:47:51 +02:00

13 lines
328 B
GDScript

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