Hide receptors inside menu
This commit is contained in:
parent
23dd718843
commit
75759659ee
|
@ -99,9 +99,12 @@ script = ExtResource( 3 )
|
||||||
|
|
||||||
[node name="Receptors" type="MeshInstance2D" parent="."]
|
[node name="Receptors" type="MeshInstance2D" parent="."]
|
||||||
material = SubResource( 1 )
|
material = SubResource( 1 )
|
||||||
|
position = Vector2( 0, 1080 )
|
||||||
mesh = SubResource( 2 )
|
mesh = SubResource( 2 )
|
||||||
script = ExtResource( 5 )
|
script = ExtResource( 5 )
|
||||||
|
|
||||||
|
[node name="Tween" type="Tween" parent="Receptors"]
|
||||||
|
|
||||||
[node name="NoteHandler" type="Node2D" parent="."]
|
[node name="NoteHandler" type="Node2D" parent="."]
|
||||||
script = ExtResource( 6 )
|
script = ExtResource( 6 )
|
||||||
|
|
||||||
|
|
|
@ -385,6 +385,7 @@ func _draw():
|
||||||
ScoreText.show()
|
ScoreText.show()
|
||||||
|
|
||||||
func set_menu_mode(mode):
|
func set_menu_mode(mode):
|
||||||
|
$'../Receptors'.fade(mode == MenuMode.GAMEPLAY)
|
||||||
menu_mode_prev = menu_mode
|
menu_mode_prev = menu_mode
|
||||||
menu_mode = mode
|
menu_mode = mode
|
||||||
menu_mode_prev_fade_timer = menu_mode_prev_fade_timer_duration
|
menu_mode_prev_fade_timer = menu_mode_prev_fade_timer_duration
|
||||||
|
|
|
@ -147,3 +147,8 @@ func _ready():
|
||||||
# if not Engine.editor_hint:
|
# if not Engine.editor_hint:
|
||||||
# set_receptor_positions(sin(OS.get_ticks_msec()*0.001*0.0125*PI)*PI)
|
# set_receptor_positions(sin(OS.get_ticks_msec()*0.001*0.0125*PI)*PI)
|
||||||
# update()
|
# update()
|
||||||
|
|
||||||
|
func fade(visible: bool):
|
||||||
|
# $Tween.interpolate_property(self, "modulate", modulate, Color(1.0, 1.0, 1.0, float(visible)), 1.0)
|
||||||
|
$Tween.interpolate_property(self, "position", position, Vector2(0.0, float(!visible)*1080), 1.0)
|
||||||
|
$Tween.start()
|
||||||
|
|
Loading…
Reference in New Issue