goodnight_jellybean/godot/assets/audio/AmbientSound.gd

17 lines
366 B
GDScript

extends Node
onready var drone_fsm: AnimationNodeStateMachinePlayback = $DroneAudioFSM.get("parameters/playback")
func _ready():
$NormalDrone.play()
yield(get_tree().create_timer(.1), "timeout")
$SicklyDrone.play()
func _on_AnimationTree_motion_status(value):
if value:
drone_fsm.travel("play_sickly_drone")
else:
drone_fsm.travel("play_normal_drone")