From 9ddc7ad36ff6762a8b034144b2e65a7223a9c93e Mon Sep 17 00:00:00 2001 From: xom9kxom9k Date: Fri, 23 Feb 2024 18:36:51 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BF=D1=80=D0=BE=D1=86=D0=B5=D1=81=D1=81=20?= =?UTF-8?q?=D0=BF=D1=80=D0=BE=D1=80=D0=B8=D1=81=D0=B2=D0=BE=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AntiAircraftGun/DrawningAntiAircraftGun.cs | 68 ++++++++++++---------- 1 file changed, 36 insertions(+), 32 deletions(-) diff --git a/AntiAircraftGun/DrawningAntiAircraftGun.cs b/AntiAircraftGun/DrawningAntiAircraftGun.cs index 66c1ead..26c63f7 100644 --- a/AntiAircraftGun/DrawningAntiAircraftGun.cs +++ b/AntiAircraftGun/DrawningAntiAircraftGun.cs @@ -179,54 +179,58 @@ public class DrawningAntiAircraftGun } Pen pen = new(Color.Black); - Pen additionalpen = new(EntityAntiAircraftGun.AdditionalColor); + Brush MainBrush = new SolidBrush(EntityAntiAircraftGun.BodyColor); + //основание + g.DrawEllipse(pen, _startPosX.Value, _startPosY.Value + 45, 20, 20); + g.DrawEllipse(pen, _startPosX.Value + 95, _startPosY.Value + 45, 20, 20); + g.DrawRectangle(pen, _startPosX.Value + 5, _startPosY.Value + 45, 100, 20); + g.FillRectangle(MainBrush, _startPosX.Value + 5, _startPosY.Value + 45, 100, 20); - //корпус гидросамолета - Brush br = new SolidBrush(EntityAntiAircraftGun.BodyColor); - g.FillRectangle(br, _startPosX.Value, _startPosY.Value + 20, 100, 20); - g.DrawRectangle(pen, _startPosX.Value, _startPosY.Value + 20, 100, 20); + g.FillEllipse(MainBrush, _startPosX.Value, _startPosY.Value + 45, 20, 20); + g.FillEllipse(MainBrush, _startPosX.Value + 95, _startPosY.Value + 45, 20, 20); - //крыло - Brush darkBrush = new SolidBrush(Color.Black); - g.FillRectangle(darkBrush, _startPosX.Value + 27, _startPosY.Value + 29, 40, 3); + g.DrawRectangle(pen, _startPosX.Value + 5, _startPosY.Value + 35, 80, 10); + g.FillRectangle(MainBrush, _startPosX.Value + 5, _startPosY.Value + 35, 80, 10); - //хвостовое крыло - g.DrawLine(pen, _startPosX.Value, _startPosY.Value + 20, _startPosX.Value, _startPosY.Value); - g.DrawLine(pen, _startPosX.Value, _startPosY.Value, _startPosX.Value + 20, _startPosY.Value + 20); + //катки - //заднее поперечное крыло - Brush additionalBrush = new SolidBrush(EntityAntiAircraftGun.AdditionalColor); - g.FillEllipse(darkBrush, _startPosX.Value - 7, _startPosY.Value + 15, 20, 5); + g.DrawEllipse(pen, _startPosX.Value + 5, _startPosY.Value + 45, 20, 20); + g.DrawEllipse(pen, _startPosX.Value + 90, _startPosY.Value + 45, 20, 20); - //нос самолёта - g.DrawLine(pen, _startPosX.Value + 100, _startPosY.Value + 20, _startPosX.Value + 130, _startPosY.Value + 30); - g.DrawLine(pen, _startPosX.Value + 100, _startPosY.Value + 40, _startPosX.Value + 130, _startPosY.Value + 30); - g.DrawLine(pen, _startPosX.Value + 130, _startPosY.Value + 30, _startPosX.Value + 100, _startPosY.Value + 30); + - //задние шасси - g.DrawLine(pen, _startPosX.Value + 21, _startPosY.Value + 40, _startPosX.Value + 21, _startPosY.Value + 45); - g.FillEllipse(darkBrush, _startPosX.Value + 15, _startPosY.Value + 45, 6, 6); - g.FillEllipse(darkBrush, _startPosX.Value + 21, _startPosY.Value + 45, 6, 6); + g.FillEllipse(MainBrush, _startPosX.Value + 5, _startPosY.Value + 45, 20, 20); + g.FillEllipse(MainBrush, _startPosX.Value, _startPosY.Value + 45, 20, 20); - //переднее шасси - g.DrawLine(pen, _startPosX.Value + 90, _startPosY.Value + 40, _startPosX.Value + 90, _startPosY.Value + 45); - g.FillEllipse(darkBrush, _startPosX.Value + 87, _startPosY.Value + 45, 6, 6); + g.DrawEllipse(pen, _startPosX.Value + 30, _startPosY.Value + 55, 10, 10); + g.FillEllipse(MainBrush, _startPosX.Value + 30, _startPosY.Value + 55, 10, 10); - // поплавки + g.DrawEllipse(pen, _startPosX.Value + 45, _startPosY.Value + 55, 10, 10); + g.FillEllipse(MainBrush, _startPosX.Value, _startPosY.Value + 55, 10, 10); + + g.DrawEllipse(pen, _startPosX.Value + 60, _startPosY.Value + 55, 10, 10); + g.FillEllipse(MainBrush, _startPosX.Value, _startPosY.Value + 55, 10, 10); + + g.DrawEllipse(pen, _startPosX.Value + 75, _startPosY.Value + 55, 10, 10); + g.FillEllipse(MainBrush, _startPosX.Value, _startPosY.Value + 55, 10, 10); + + //tower_gin if (EntityAntiAircraftGun.Tower) { - Brush br2 = new SolidBrush(Color.Red); - g.FillRectangle(br2, _startPosX.Value + 10, _startPosY.Value + 48, 90, 5); - } + g.DrawRectangle(pen, _startPosX.Value + 50, _startPosY.Value + 20, 50, 5); + g.FillRectangle(MainBrush, _startPosX.Value + 50, _startPosY.Value + 20, 50, 5); - // надувная лодка + g.DrawRectangle(pen, _startPosX.Value + 25, _startPosY.Value + 15, 30, 20); + g.FillRectangle(MainBrush, _startPosX.Value + 25, _startPosY.Value + 15, 30, 20); + } + //зенитка if (EntityAntiAircraftGun.Radar) { - g.FillRectangle(additionalBrush, _startPosX.Value + 38, _startPosY.Value + 38, 22, 8); - + } + } } \ No newline at end of file