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=""
package/unique_name="com.example.$genname"
package/name=""
package/signed=false
package/signed=true
package/app_category=2
package/retain_data_on_uninstall=false
package/exclude_from_recents=false

View File

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

View File

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

View File

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