Fix stop
This commit is contained in:
parent
736344e8ad
commit
f91e3ddf2b
@ -31,19 +31,30 @@ anchor_top = 0.5
|
|||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
anchor_bottom = 0.5
|
anchor_bottom = 0.5
|
||||||
offset_left = -262.5
|
offset_left = -262.5
|
||||||
offset_top = -70.0
|
offset_top = -78.0
|
||||||
offset_right = 262.5
|
offset_right = 262.5
|
||||||
offset_bottom = 70.0
|
offset_bottom = 78.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
|
|
||||||
[node name="Sliders" type="HBoxContainer" parent="App"]
|
[node name="Sliders" type="HBoxContainer" parent="App"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="GridContainer" type="GridContainer" parent="App/Sliders"]
|
[node name="GridContainer" type="HBoxContainer" parent="App/Sliders"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_vertical = 4
|
||||||
|
|
||||||
|
[node name="ChordVolume" type="HSlider" parent="App/Sliders/GridContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="HSlider" type="HSlider" parent="App/Sliders/GridContainer"]
|
[node name="NoteVolume" type="HSlider" parent="App/Sliders/GridContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="RhythmVolume" type="HSlider" parent="App/Sliders/GridContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="RhythmTempo" type="HSlider" parent="App/Sliders/GridContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="Buttons" type="HBoxContainer" parent="App"]
|
[node name="Buttons" type="HBoxContainer" parent="App"]
|
||||||
|
@ -2,12 +2,18 @@ extends Node
|
|||||||
|
|
||||||
# Add asset here
|
# Add asset here
|
||||||
var RhythmPlayer: AudioStreamPlayer
|
var RhythmPlayer: AudioStreamPlayer
|
||||||
|
var ChordPlayer: AudioStreamPlayer
|
||||||
|
var NotePlayer: AudioStreamPlayer
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready():
|
func _ready():
|
||||||
RhythmPlayer = get_node("/root/Control/RhythmPlayer")
|
RhythmPlayer = get_node("/root/Control/RhythmPlayer")
|
||||||
|
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():
|
||||||
# Play chord
|
# Play chord
|
||||||
RhythmPlayer.stop()
|
RhythmPlayer.stop()
|
||||||
|
ChordPlayer.stop()
|
||||||
|
NotePlayer.stop()
|
||||||
|
Loading…
Reference in New Issue
Block a user