13 lines
229 B
GDScript
13 lines
229 B
GDScript
|
extends Node
|
||
|
|
||
|
export var main_theme: AudioStream
|
||
|
|
||
|
onready var themes = {"main": main_theme}
|
||
|
|
||
|
onready var player: AudioStreamPlayer = $Player
|
||
|
|
||
|
|
||
|
func play_theme(theme: String) -> void:
|
||
|
player.stream = themes[theme]
|
||
|
player.play()
|