From 7aa0aa5bad810dc6d3b1a0365f21e2be17f28163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A4=D1=91=D0=B4=D0=BE=D1=80=20=D0=92=D0=B5=D1=81=D0=B5?= =?UTF-8?q?=D0=BB=D0=BE=D0=B2?= Date: Thu, 3 Oct 2024 01:24:52 +0500 Subject: [PATCH] Offlane fix --- scenes/debug_lvl.tscn | 20 +++++++++++++++++++ .../components/plants/ThreepeaterShooter.cs | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/scenes/debug_lvl.tscn b/scenes/debug_lvl.tscn index a8e9a0e..b600621 100644 --- a/scenes/debug_lvl.tscn +++ b/scenes/debug_lvl.tscn @@ -65,8 +65,28 @@ _line = 3 position = Vector2(848, 254) _line = 3 +[node name="Zombie5" parent="." instance=ExtResource("9_vwrdf")] +position = Vector2(801, 376) +_line = 5 + +[node name="Zombie6" parent="." instance=ExtResource("9_vwrdf")] +position = Vector2(819, 376) +_line = 5 + +[node name="Zombie7" parent="." instance=ExtResource("9_vwrdf")] +position = Vector2(774, 376) +_line = 5 + +[node name="Zombie8" parent="." instance=ExtResource("9_vwrdf")] +position = Vector2(843, 376) +_line = 5 + [connection signal="timeout" from="SunSpawner/Timer" to="SunSpawner" method="Spawn"] [connection signal="OnHPChanged" from="Zombie" to="Zombie/AudioStreamPlayer2D" method="OnHPChanged"] [connection signal="OnHPChanged" from="Zombie2" to="Zombie2/AudioStreamPlayer2D" method="OnHPChanged"] [connection signal="OnHPChanged" from="Zombie3" to="Zombie3/AudioStreamPlayer2D" method="OnHPChanged"] [connection signal="OnHPChanged" from="Zombie4" to="Zombie4/AudioStreamPlayer2D" method="OnHPChanged"] +[connection signal="OnHPChanged" from="Zombie5" to="Zombie5/AudioStreamPlayer2D" method="OnHPChanged"] +[connection signal="OnHPChanged" from="Zombie6" to="Zombie6/AudioStreamPlayer2D" method="OnHPChanged"] +[connection signal="OnHPChanged" from="Zombie7" to="Zombie7/AudioStreamPlayer2D" method="OnHPChanged"] +[connection signal="OnHPChanged" from="Zombie8" to="Zombie8/AudioStreamPlayer2D" method="OnHPChanged"] diff --git a/scripts/components/plants/ThreepeaterShooter.cs b/scripts/components/plants/ThreepeaterShooter.cs index 328c3da..5da8317 100644 --- a/scripts/components/plants/ThreepeaterShooter.cs +++ b/scripts/components/plants/ThreepeaterShooter.cs @@ -9,7 +9,7 @@ public partial class ThreepeaterShooter : Shooter { for(int i = -1; i <= 1; i++) { - if ((int)GetParent().GlobalPosition.Y/Utility.TileHeight+i < 0 || (int)GetParent().GlobalPosition.Y/Utility.TileHeight+i > Utility.LineCount+1) + if ((int)GetParent().GlobalPosition.Y/Utility.TileHeight+i < 0 || (int)GetParent().GlobalPosition.Y/Utility.TileHeight+i > Utility.LineCount) continue; var instance = _projectile.Instantiate();