Fixed background offset

This commit is contained in:
2026-07-03 12:17:18 +03:00
parent afee0f0461
commit cab1490cd9
2 changed files with 3 additions and 4 deletions
+1 -2
View File
@@ -3,7 +3,6 @@ extends Node2D
const CORRUPTION_DAMAGE = 10.0 const CORRUPTION_DAMAGE = 10.0
const ADDITIONAL_SCROLL_OFFSET = 500.0
const MAX_DISTANCE_TO_CORRUPTION = 320.0 const MAX_DISTANCE_TO_CORRUPTION = 320.0
@@ -36,7 +35,7 @@ var _corruption_x: float
func _ready() -> void: func _ready() -> void:
parallax_1.scroll_offset.x = ADDITIONAL_SCROLL_OFFSET + background_offset parallax_1.scroll_offset.x = -background_offset * parallax_1.scroll_scale.x
_corruption_x = initial_corruption_x _corruption_x = initial_corruption_x
pause_menu.hide() pause_menu.hide()
+2 -2
View File
@@ -3428,9 +3428,9 @@ script = ExtResource("1_o2mui")
[node name="Parallax1" type="Parallax2D" parent="Background" unique_id=1102720638] [node name="Parallax1" type="Parallax2D" parent="Background" unique_id=1102720638]
scroll_scale = Vector2(0.01, 0.01) scroll_scale = Vector2(0.01, 0.01)
scroll_offset = Vector2(500, 180) scroll_offset = Vector2(0, 180)
repeat_size = Vector2(900, 0) repeat_size = Vector2(900, 0)
repeat_times = 2 repeat_times = 3
[node name="Sprite2D" type="Sprite2D" parent="Background/Parallax1" unique_id=1313622890] [node name="Sprite2D" type="Sprite2D" parent="Background/Parallax1" unique_id=1313622890]
texture = ExtResource("2_3fw0b") texture = ExtResource("2_3fw0b")