From 337151391d55e143c4d260f120e86c54230622e0 Mon Sep 17 00:00:00 2001 From: elizaveta Date: Tue, 26 Mar 2024 23:59:57 +0400 Subject: [PATCH] commit --- Tank/Tank/DrawningTank.cs | 39 +++++++++++---------------------------- 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/Tank/Tank/DrawningTank.cs b/Tank/Tank/DrawningTank.cs index 094d06e..48820a5 100644 --- a/Tank/Tank/DrawningTank.cs +++ b/Tank/Tank/DrawningTank.cs @@ -161,32 +161,15 @@ public class DrawningTank Brush additionalBrush = new SolidBrush(EntityTank.AdditionalColor); Brush bodyBrush = new SolidBrush(EntityTank.BodyColor); - //linii v gusenice - Point p4 = new Point(_startPosX.Value + 100, _startPosY.Value + 10); - Point p5 = new Point(_startPosX.Value + 100, _startPosY.Value + 10); - Point p6 = new Point(_startPosX.Value + 100, _startPosY.Value + 10); - Point p7 = new Point(_startPosX.Value + 100, _startPosY.Value + 10); - Point[] p_pulemet = { p4, p5, p6, p7 }; - g.FillPolygon(additionalBrush, p_pulemet); - g.DrawEllipse(pen, _startPosX.Value, _startPosY.Value + 45, 150, 60); g.DrawEllipse(pen, _startPosX.Value + 5, _startPosY.Value + 60, 33, 33); g.DrawEllipse(pen, _startPosX.Value + 110, _startPosY.Value + 60, 33, 33); - //otrisovka gusenici - g.DrawEllipse(pen, _startPosX.Value + 11, _startPosY.Value + 66, 20, 20); - g.DrawEllipse(pen, _startPosX.Value + 117, _startPosY.Value + 66, 20, 20); - g.DrawEllipse(pen, _startPosX.Value + 35, _startPosY.Value + 80, 16, 16); g.DrawEllipse(pen, _startPosX.Value + 55, _startPosY.Value + 83, 16, 16); g.DrawEllipse(pen, _startPosX.Value + 75, _startPosY.Value + 83, 16, 16); g.DrawEllipse(pen, _startPosX.Value + 95, _startPosY.Value + 80, 16, 16); - g.FillEllipse(bodyBrush, _startPosX.Value + 38, _startPosY.Value + 83, 10, 10); - g.FillEllipse(bodyBrush, _startPosX.Value + 58, _startPosY.Value + 86, 10, 10); - g.FillEllipse(bodyBrush, _startPosX.Value + 78, _startPosY.Value + 86, 10, 10); - g.FillEllipse(bodyBrush, _startPosX.Value + 98, _startPosY.Value + 83, 10, 10); - g.FillEllipse(bodyBrush, _startPosX.Value + 45, _startPosY.Value + 55, 15, 15); g.FillEllipse(bodyBrush, _startPosX.Value + 65, _startPosY.Value + 55, 15, 15); g.FillEllipse(bodyBrush, _startPosX.Value + 85, _startPosY.Value + 55, 15, 15); @@ -194,17 +177,17 @@ public class DrawningTank g.FillRectangle(bodyBrush, _startPosX.Value + 30, _startPosY.Value + 10, 100, 30); g.FillRectangle(bodyBrush, _startPosX.Value + 5, _startPosY.Value + 40, 140, 25); - //if(EntityTank.Pushka) - // g.FillRectangle(additionalBrush, _startPosX.Value + 120, _startPosY.Value + 20, 100, 15); + if (EntityTank.Pushka) + g.FillRectangle(additionalBrush, _startPosX.Value + 120, _startPosY.Value + 20, 100, 15); - //if (EntityTank.Pulemet) - //{ - // Point p = new Point(_startPosX.Value + 75, _startPosY.Value + 10); - // Point p1 = new Point(_startPosX.Value + 80, _startPosY.Value + 1); - // Point p2 = new Point(_startPosX.Value + 87, _startPosY.Value + 2); - // Point p3 = new Point(_startPosX.Value + 80, _startPosY.Value + 10); - // Point[] p_pulemet = { p, p1, p2, p3 }; - // g.FillPolygon(additionalBrush, p_pulemet); - //} + if (EntityTank.Pulemet) + { + Point p = new Point(_startPosX.Value + 75, _startPosY.Value + 10); + Point p1 = new Point(_startPosX.Value + 80, _startPosY.Value + 1); + Point p2 = new Point(_startPosX.Value + 87, _startPosY.Value + 2); + Point p3 = new Point(_startPosX.Value + 80, _startPosY.Value + 10); + Point[] p_pulemet = { p, p1, p2, p3 }; + g.FillPolygon(additionalBrush, p_pulemet); + } } }