diff --git a/Tank/Tank/DrawArmoVehicle.cs b/Tank/Tank/DrawArmoVehicle.cs index be5947b..aa389df 100644 --- a/Tank/Tank/DrawArmoVehicle.cs +++ b/Tank/Tank/DrawArmoVehicle.cs @@ -112,18 +112,9 @@ namespace Tank Brush BrushRandom = new SolidBrush(Tank?.BodyColor ?? Color.Black); //Корпус - Brush WhiteColor = new SolidBrush(Color.White); - g.FillRectangle(WhiteColor, _startPosX, _startPosY, 155, 30); - - Point[] pointsbody1 = { new Point(_startPosX + 5, _startPosY + 30), new Point(_startPosX + 110, _startPosY + 30), + Point[] pointsbody = { new Point(_startPosX + 5, _startPosY + 30), new Point(_startPosX + 110, _startPosY + 30), new Point(_startPosX + 142, _startPosY + 30), new Point(_startPosX + 120, _startPosY + 45), new Point(_startPosX + 12, _startPosY + 45) }; - g.FillPolygon(BrushRandom, pointsbody1); - - // Гусеница - g.FillRectangle(BrushRandom, 28 + _startPosX, 50 + _startPosY, 10, 3); - g.FillRectangle(BrushRandom, 53 + _startPosX, 50 + _startPosY, 10, 3); - g.FillRectangle(BrushRandom, 78 + _startPosX, 50 + _startPosY, 10, 3); - g.FillRectangle(BrushRandom, 103 + _startPosX, 50 + _startPosY, 10, 3); + g.FillPolygon(BrushRandom, pointsbody); // Колеса, катки Brush ColorBlack = new SolidBrush(Color.Black); diff --git a/Tank/Tank/DrawTank.cs b/Tank/Tank/DrawTank.cs index 8e94d83..2406af3 100644 --- a/Tank/Tank/DrawTank.cs +++ b/Tank/Tank/DrawTank.cs @@ -37,19 +37,19 @@ namespace Tank.DrawningObjects if (ArmoVehicle.Caterpillar) { - Pen pen = new(Color.Black); - Brush lineBrush = new SolidBrush(Color.Gray); // Гусеница // Отрисовка танковых катков - Brush BrushBlack = new SolidBrush(Color.Black); - g.FillEllipse(BrushBlack, _startPosX + 113, _startPosY + 41, 11, 11); - g.FillEllipse(BrushBlack, _startPosX + 13, _startPosY + 40, 11, 11); + Brush BrushRandom = new SolidBrush(Tank?.BodyColor ?? Color.Black); + g.FillRectangle(BrushRandom, 28 + _startPosX, 50 + _startPosY, 10, 3); + g.FillRectangle(BrushRandom, 53 + _startPosX, 50 + _startPosY, 10, 3); + g.FillRectangle(BrushRandom, 78 + _startPosX, 50 + _startPosY, 10, 3); + g.FillRectangle(BrushRandom, 103 + _startPosX, 50 + _startPosY, 10, 3); } if (ArmoVehicle.Tower) { - Brush bodyBrush = new SolidBrush(ArmoVehicle.AdditionalColor); // Орудие + Brush bodyBrush = new SolidBrush(ArmoVehicle.AdditionalColor); g.FillRectangle(bodyBrush, _startPosX + 111, _startPosY + 17, 70, 5); // Зенитное орудие