Offlane fix

This commit is contained in:
Фёдор Веселов 2024-10-03 01:24:52 +05:00
commit 7aa0aa5bad
2 changed files with 21 additions and 1 deletions

View file

@ -65,8 +65,28 @@ _line = 3
position = Vector2(848, 254) position = Vector2(848, 254)
_line = 3 _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="timeout" from="SunSpawner/Timer" to="SunSpawner" method="Spawn"]
[connection signal="OnHPChanged" from="Zombie" to="Zombie/AudioStreamPlayer2D" method="OnHPChanged"] [connection signal="OnHPChanged" from="Zombie" to="Zombie/AudioStreamPlayer2D" method="OnHPChanged"]
[connection signal="OnHPChanged" from="Zombie2" to="Zombie2/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="Zombie3" to="Zombie3/AudioStreamPlayer2D" method="OnHPChanged"]
[connection signal="OnHPChanged" from="Zombie4" to="Zombie4/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"]

View file

@ -9,7 +9,7 @@ public partial class ThreepeaterShooter : Shooter
{ {
for(int i = -1; i <= 1; i++) for(int i = -1; i <= 1; i++)
{ {
if ((int)GetParent<Node2D>().GlobalPosition.Y/Utility.TileHeight+i < 0 || (int)GetParent<Node2D>().GlobalPosition.Y/Utility.TileHeight+i > Utility.LineCount+1) if ((int)GetParent<Node2D>().GlobalPosition.Y/Utility.TileHeight+i < 0 || (int)GetParent<Node2D>().GlobalPosition.Y/Utility.TileHeight+i > Utility.LineCount)
continue; continue;
var instance = _projectile.Instantiate<Node2D>(); var instance = _projectile.Instantiate<Node2D>();