diff --git a/mini-game/scenes/decor/foreground.gd b/mini-game/scenes/decor/foreground.gd index afec207..97dbdc1 100644 --- a/mini-game/scenes/decor/foreground.gd +++ b/mini-game/scenes/decor/foreground.gd @@ -2,18 +2,23 @@ extends Node2D onready var texture : TextureRect = $TextureRect +var force_stop = false var moving = false func stop(): moving = false + force_stop = true texture.material.set_shader_param("scroll_speed", 0) func start(): moving = true + force_stop = false texture.material.set_shader_param("scroll_speed", 0.2) func _process(delta): - if get_tree().paused and moving: - stop() - elif not get_tree().paused and not moving: - start() + if not force_stop: + if get_tree().paused and moving: + stop() + force_stop = false + elif not get_tree().paused and not moving: + start() diff --git a/scenes/PauseMenu.tscn b/scenes/PauseMenu.tscn index 5b10c25..eda57cd 100644 --- a/scenes/PauseMenu.tscn +++ b/scenes/PauseMenu.tscn @@ -11,6 +11,7 @@ font_data = ExtResource( 4 ) [node name="PauseMenu" type="Control"] pause_mode = 2 +visible = false anchor_right = 1.0 anchor_bottom = 1.0 script = ExtResource( 1 ) diff --git a/scenes/UI.tscn b/scenes/UI.tscn index 4478a6a..c7216a8 100644 --- a/scenes/UI.tscn +++ b/scenes/UI.tscn @@ -51,6 +51,8 @@ __meta__ = { margin_left = 1836.0 margin_right = 1900.0 margin_bottom = 64.0 +focus_mode = 0 +enabled_focus_mode = 0 texture_normal = ExtResource( 1 ) [node name="ColorRect" type="ColorRect" parent="MarginContainer/HBoxContainer/TextureButton"]