diff --git a/ProjectAirFighter/ProjectAirFighter/CollectionGenericObjects/AirCraftAngar.cs b/ProjectAirFighter/ProjectAirFighter/CollectionGenericObjects/AirCraftAngar.cs index b4ced2c..a2c59ad 100644 --- a/ProjectAirFighter/ProjectAirFighter/CollectionGenericObjects/AirCraftAngar.cs +++ b/ProjectAirFighter/ProjectAirFighter/CollectionGenericObjects/AirCraftAngar.cs @@ -21,6 +21,7 @@ public class AirCraftAngar : AbstractCompany /// /// Графика int pamat_i = 0; + int pamat_j = 0; protected override void DrawBackgound(Graphics g) { Pen pen = new(Color.Black, 4); @@ -29,6 +30,7 @@ public class AirCraftAngar : AbstractCompany pamat_i = i; for (int j = 0; j < _pictureHeight / _placeSizeHeight; j++) { + pamat_j = j; g.DrawLine(pen, new(_placeSizeWidth * i, _placeSizeHeight * j), new((int)(_placeSizeWidth * (i + 0.5f)), _placeSizeHeight * j)); g.DrawLine(pen, new(_placeSizeWidth * i, _placeSizeHeight * j), new(_placeSizeWidth * i, _placeSizeHeight * (j + 1))); } @@ -43,7 +45,7 @@ public class AirCraftAngar : AbstractCompany protected override void SetObjectsPosition() { int currentIndex = -1; - for (int j = 0 ; j < _pictureHeight / _placeSizeHeight; j++) + for (int j = pamat_j; j >= 0; j--) { for (int i = pamat_i; i >= 0; i--) {