Fix bugs in note controller being removed

This commit is contained in:
Isaac Shoebottom 2024-06-27 17:00:32 -03:00
parent 9475b5d12c
commit 4ebc18d56a
4 changed files with 13 additions and 18 deletions

View File

@ -30,7 +30,7 @@ version/code=1
version/name="" version/name=""
package/unique_name="com.example.$genname" package/unique_name="com.example.$genname"
package/name="" package/name=""
package/signed=false package/signed=true
package/app_category=2 package/app_category=2
package/retain_data_on_uninstall=false package/retain_data_on_uninstall=false
package/exclude_from_recents=false package/exclude_from_recents=false

View File

@ -26,18 +26,12 @@ size_flags_vertical = 4
[node name="RhythmPlayer" type="AudioStreamPlayer" parent="."] [node name="RhythmPlayer" type="AudioStreamPlayer" parent="."]
[node name="App" type="VBoxContainer" parent="."] [node name="App" type="VBoxContainer" parent="."]
layout_mode = 1 layout_mode = 0
anchors_preset = 8 offset_left = 52.0
anchor_left = 0.5 offset_top = 97.0
anchor_top = 0.5 offset_right = 577.0
anchor_right = 0.5 offset_bottom = 327.0
anchor_bottom = 0.5 scale = Vector2(2, 2)
offset_left = -262.5
offset_top = -78.0
offset_right = 262.5
offset_bottom = 78.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_wynm3") script = ExtResource("1_wynm3")
[node name="Sliders" type="GridContainer" parent="App"] [node name="Sliders" type="GridContainer" parent="App"]

View File

@ -13,6 +13,7 @@ func _ready():
func button_pressed(): func button_pressed():
NotePlayer.stream = NoteAudio NotePlayer.stream = NoteAudio
if !NotePlayer.playing:
NotePlayer.play() NotePlayer.play()
func chord_changed(chord): func chord_changed(chord):

View File

@ -7,10 +7,10 @@ var NotePlayer: AudioStreamPlayer
func _ready(): func _ready():
RhythmPlayer = get_node("/root/Control/RhythmPlayer") RhythmPlayer = get_node("/root/Control/RhythmPlayer")
ChordPlayer = get_node("/root/Control/ChordPlayer") ChordPlayer = get_node("/root/Control/ChordPlayer")
NotePlayer = get_node("/root/Control/NotePlayer")
self.pressed.connect(button_pressed) self.pressed.connect(button_pressed)
func button_pressed(): func button_pressed():
if RhythmPlayer.playing:
RhythmPlayer.stop() RhythmPlayer.stop()
if ChordPlayer.playing:
ChordPlayer.stop() ChordPlayer.stop()
NotePlayer.stop()