the-crypt/meta/Music.gd

17 lines
476 B
GDScript3
Raw Normal View History

2020-07-23 22:36:21 -05:00
extends Node
onready var MainMusic: AudioStreamPlayer = $MainMusic
onready var Ambience: AudioStreamPlayer = $Ambience
2020-07-24 02:14:12 -05:00
onready var CreditMusic: AudioStreamPlayer = $CreditMusic
2020-07-23 22:36:21 -05:00
func _process(delta):
2020-07-24 02:14:12 -05:00
if Player.current_scene == "res://levels/Campaign/Credits/Credits.tscn":
CreditMusic.playing = true
2020-07-24 01:27:07 -05:00
MainMusic.playing = false
Ambience.playing = false
else:
if not MainMusic.playing:
MainMusic.playing = true
if not Ambience.playing:
Ambience.playing = true