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();