File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -108,9 +108,9 @@ func _input(event):
108108 if event .is_action_pressed ("slower" ):
109109 $ Timer .wait_time = min ($ Timer .wait_time * 4 , MAX_WAIT )
110110 if event .is_action_pressed ("change_data" ):
111- AudioServer .set_bus_mute (AudioServer .get_bus_index ("Master" ), true )
112111 var display = $ Level/Right/Display if $ Level .visible else $ BigDisplay
113112 display .get_node ("HBoxContainer" ).hide ()
113+ display .get_node ("HBoxContainer" ).sound .set_process (false )
114114 display .get_node ("TypesContainer" ).show ()
115115 $ Timer .stop ()
116116 display .get_node ("TypesContainer/Types" ).get_child (0 ).grab_focus ()
@@ -133,7 +133,6 @@ func _on_Current_pressed():
133133 {"level" : LEVELS [_index ], "size" : _size , "data_type" : _data_type })
134134
135135func _on_Button_pressed (data_type ):
136- AudioServer .set_bus_mute (AudioServer .get_bus_index ("Master" ), false )
137136 var display = $ Level/Right/Display if $ Level .visible else $ BigDisplay
138137 display .get_node ("TypesContainer" ).hide ()
139138 display .get_node ("HBoxContainer" ).show ()
Original file line number Diff line number Diff line change @@ -16,15 +16,15 @@ var _rects = []
1616var _positions = []
1717var _pointer = Polygon2D .new ()
1818var _pointer_size : int
19- var _sound = ArraySound .new ()
19+ var sound = ArraySound .new ()
2020onready var _separation = 128 / _level .array .size
2121
2222func _init (level ):
2323 _level = level
2424 add_child (_level ) # NOTE: This is necessary for it to read input
2525 add_child (_tween ) # NOTE: This is necessary for it to animate
2626 add_child (_pointer )
27- add_child (_sound )
27+ add_child (sound )
2828 _pointer .hide ()
2929
3030func _ready ():
@@ -67,7 +67,7 @@ func _ready():
6767 _pointer .show ()
6868
6969func _process (delta ):
70- _sound .frac = _level .get_frac ()
70+ sound .frac = _level .get_frac ()
7171 if _pointer .visible :
7272 var pointed = _level .get_pointer ()
7373 var height = rect_size .y - _pointer_size * 2
@@ -79,7 +79,7 @@ func _process(delta):
7979
8080func _on_ComparisonSort_done ():
8181 set_process (false )
82- _sound .player .stop ()
82+ sound .player .stop ()
8383 _pointer .hide ()
8484 for i in range (_rects .size ()):
8585 _rects [i ].color = ComparisonSort .EFFECTS .NONE
You can’t perform that action at this time.
0 commit comments