22 lines
634 B
GDScript
22 lines
634 B
GDScript
extends Node
|
|
|
|
func _ready() -> void:
|
|
$AudioStreamPlayer.play()
|
|
|
|
|
|
func _on_boss_area_entered(_body: Node2D) -> void:
|
|
print_debug("Boss area entered")
|
|
if $AudioStreamPlayer["parameters/switch_to_clip"] == "Boss":
|
|
print_debug("Already in boss music")
|
|
return
|
|
|
|
$AudioStreamPlayer["parameters/switch_to_clip"] = "-> Boss"
|
|
|
|
|
|
func _on_boss_area_exited(_body: Node2D) -> void:
|
|
print_debug("Boss area exited")
|
|
if $AudioStreamPlayer["parameters/switch_to_clip"] == "Base":
|
|
print_debug("Already in base music")
|
|
return
|
|
|
|
$AudioStreamPlayer["parameters/switch_to_clip"] = "-> Base" |