From fd17593df5bb84de4ca742b625b44ed2ae9a3c68 Mon Sep 17 00:00:00 2001 From: malimova Date: Sat, 7 Oct 2023 09:46:26 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=B2=D1=82=D0=BE=D1=80=D0=BE=D0=B9=20=D1=81?= =?UTF-8?q?=D1=82=D1=80=D0=B0=D1=82=D0=B5=D0=B3=D0=B8=D0=B8,=20=D1=87?= =?UTF-8?q?=D0=B8=D1=81=D1=82=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AirBomber/AirBomber/DrawningAirBomber.cs | 4 +--- AirBomber/AirBomber/DrawningAirPlane.cs | 2 +- AirBomber/AirBomber/MoveToBorder.cs | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/AirBomber/AirBomber/DrawningAirBomber.cs b/AirBomber/AirBomber/DrawningAirBomber.cs index b8eabe9..ef48919 100644 --- a/AirBomber/AirBomber/DrawningAirBomber.cs +++ b/AirBomber/AirBomber/DrawningAirBomber.cs @@ -22,7 +22,7 @@ namespace AirBomber /// Ширина картинки /// Высота картинки public DrawningAirBomber(int speed, double weight, Color bodyColor, Color - additionalColor, bool bombs, Color bombsColor, bool fuelTanks, int width, int height) : + additionalColor, bool bombs, Color bombsColor, bool fuelTanks, int width, int height) : base(speed, weight, bodyColor, width, height, 160, 118) { @@ -42,14 +42,12 @@ namespace AirBomber Brush bombsColor = new SolidBrush(airBomber.BombsColor); base.DrawPlane(g); // обвесы - g.FillEllipse(bombsColor, _startPosX + 90, _startPosY + 20, 15, 29); g.DrawEllipse(pen, _startPosX + 90, _startPosY + 20, 15, 29); g.FillEllipse(bombsColor, _startPosX + 90, _startPosY + 70, 15, 29); g.DrawEllipse(pen, _startPosX + 90, _startPosY + 70, 15, 29); g.FillEllipse(bombsColor, _startPosX + 140, _startPosY + 50, 15, 15); g.DrawEllipse(pen, _startPosX + 140, _startPosY + 50, 15, 15); - // fueltanks g.FillRectangle(additionalBrush, _startPosX + 63, _startPosY + 34, 20, 15); g.DrawRectangle(pen, _startPosX + 63, _startPosY + 34, 20, 15); diff --git a/AirBomber/AirBomber/DrawningAirPlane.cs b/AirBomber/AirBomber/DrawningAirPlane.cs index daeaea6..237e2dd 100644 --- a/AirBomber/AirBomber/DrawningAirPlane.cs +++ b/AirBomber/AirBomber/DrawningAirPlane.cs @@ -227,7 +227,7 @@ namespace AirBomber // вправо DirectionType.Right => _startPosX + EntityAirPlane.Step + _airPlaneWidth < _pictureWidth, //вниз - DirectionType.Down => _startPosY + EntityAirPlane.Step + _airPlaneHeight< _pictureHeight, + DirectionType.Down => _startPosY + EntityAirPlane.Step + _airPlaneHeight < _pictureHeight, _ => false, }; } diff --git a/AirBomber/AirBomber/MoveToBorder.cs b/AirBomber/AirBomber/MoveToBorder.cs index b6bb968..f0c5ff3 100644 --- a/AirBomber/AirBomber/MoveToBorder.cs +++ b/AirBomber/AirBomber/MoveToBorder.cs @@ -21,6 +21,7 @@ namespace AirBomber var objParams = GetObjectParameters; if (objParams == null) return; if (objParams.RightBorder < FieldWidth - GetStep()) MoveRight(); + if (objParams.DownBorder < FieldHeight - GetStep()) MoveDown(); } } }