OmnichordGodot/scripts/StopController.gd

17 lines
416 B
GDScript3
Raw Normal View History

2024-06-26 23:49:24 -03:00
extends Node
var RhythmPlayer: AudioStreamPlayer
2024-06-27 00:03:20 -03:00
var ChordPlayer: AudioStreamPlayer
var NotePlayer: AudioStreamPlayer
2024-06-26 23:49:24 -03:00
func _ready():
RhythmPlayer = get_node("/root/Control/RhythmPlayer")
2024-06-27 00:03:20 -03:00
ChordPlayer = get_node("/root/Control/ChordPlayer")
NotePlayer = get_node("/root/Control/NotePlayer")
2024-06-26 23:49:24 -03:00
self.pressed.connect(button_pressed)
func button_pressed():
RhythmPlayer.stop()
2024-06-27 00:03:20 -03:00
ChordPlayer.stop()
NotePlayer.stop()