From 9daa025f96f693ae5635e71e26dac4de321d4e8a Mon Sep 17 00:00:00 2001 From: artur-kalimullin <144933634+artur-kalimullin@users.noreply.github.com> Date: Tue, 26 Mar 2024 22:44:58 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=BA=D0=B0=20=D0=B2=D1=81=D1=82=D0=B0=D0=B2=D0=BA=D0=B8?= =?UTF-8?q?=20=D0=BE=D0=B1=D1=8C=D0=B5=D0=BA=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CollectionGenericObjects/AirCraftAngar.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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--) {