Jam10/Scenes/Autoloads/MusicController.gd

38 lines
951 B
GDScript3
Raw Normal View History

2023-01-30 02:39:59 +00:00
extends Node
var intro_snow = load("res://BGM/Intro_Snow_-_Utsuho.mp3")
var kyouko_snow = load("res://BGM/Kyouko_Snow_-_Utsuho.mp3")
var letty_snow = load("res://BGM/Letty_Snow_-_Utsuho.mp3")
var score_end = load("res://BGM/Score_End_-_Utsuho.mp3")
var player : AudioStreamPlayer
2023-01-30 19:49:06 +00:00
var difficulty: String = "Easy"
2023-01-30 02:39:59 +00:00
func _ready():
player = get_node("AudioStreamPlayer")
func play_intro_snow():
if not player.playing or not player.stream == intro_snow:
player.stop()
player.stream = intro_snow
player.play()
func play_kyouko_snow():
if not player.playing or not player.stream == kyouko_snow:
player.stop()
player.stream = kyouko_snow
player.play()
func play_letty_snow():
if not player.playing or not player.stream == letty_snow:
player.stop()
player.stream = letty_snow
player.play()
func play_score_end():
if not player.playing or not player.stream == score_end:
player.stop()
player.stream = score_end
player.play()