diff --git a/ProjectTank/ProjectTank/DrawningArmoredTransport.cs b/ProjectTank/ProjectTank/DrawningArmoredTransport.cs index 4394b3d..3effdab 100644 --- a/ProjectTank/ProjectTank/DrawningArmoredTransport.cs +++ b/ProjectTank/ProjectTank/DrawningArmoredTransport.cs @@ -130,7 +130,6 @@ namespace ProjectTank.DrawningObjects Brush blackColorBrush = new SolidBrush(Color.Black); Brush bodyBrush = new SolidBrush(EntityArmoredTransport.BodyColor); - // Границы автомобиля // гусеницы g.DrawEllipse(pen, _startPosX + 14, _startPosY + 44, 151, 31); @@ -145,11 +144,10 @@ namespace ProjectTank.DrawningObjects // Кузов g.DrawRectangle(pen, _startPosX + 19, _startPosY + 34, 141, 21); g.FillRectangle(bodyBrush, _startPosX + 20, _startPosY + 35, 140, 20); - // Башня g.FillRectangle(blackColorBrush, _startPosX + 75, _startPosY + 10, 25, 5); g.DrawRectangle(pen, _startPosX + 64, _startPosY + 14, 66, 21); - g.FillRectangle(bodyBrush, _startPosX + 65, _startPosY + 15, 65, 20); //*** -> bodyBrush <- additionalBrush + g.FillRectangle(bodyBrush, _startPosX + 65, _startPosY + 15, 65, 20); //Точки для отрисовки передней и задней части Point pointFirstBackSide = new Point(_startPosX + 18, _startPosY + 35); @@ -158,7 +156,6 @@ namespace ProjectTank.DrawningObjects Point pointFirstFrontSide = new Point(_startPosX + 162, _startPosY + 35); Point pointSecondFrontSide = new Point(_startPosX + 185, _startPosY + 55); Point pointThirdFrontSide = new Point(_startPosX + 162, _startPosY + 55); - // Задняя часть Point[] backSide = { pointFirstBackSide, pointSecondBackSide, pointThirdBackSide }; g.DrawPolygon(pen, backSide); diff --git a/ProjectTank/ProjectTank/DrawningObjectArmoredTransport.cs b/ProjectTank/ProjectTank/DrawningObjectArmoredTransport.cs index fe3b14d..f8198ab 100644 --- a/ProjectTank/ProjectTank/DrawningObjectArmoredTransport.cs +++ b/ProjectTank/ProjectTank/DrawningObjectArmoredTransport.cs @@ -9,7 +9,7 @@ namespace ProjectTank.MovementStrategy { /// /// Реализация интерфейса IDrawningObject для работы с объектом DrawningCar(паттерн Adapter) -/// + /// public class DrawningObjectArmoredTransport : IMoveableObject { private readonly DrawningArmoredTransport? _drawningArmoredTransport = null; diff --git a/ProjectTank/ProjectTank/DrawningTank.cs b/ProjectTank/ProjectTank/DrawningTank.cs index f3e90cf..2b85acc 100644 --- a/ProjectTank/ProjectTank/DrawningTank.cs +++ b/ProjectTank/ProjectTank/DrawningTank.cs @@ -26,13 +26,12 @@ namespace ProjectTank.DrawningObjects /// Ширина картинки /// Высота картинки public DrawningTank(int speed, double weight, Color bodyColor, Color - additionalColor, bool gun, bool machineGun, int width, int height) : - base(speed, weight, bodyColor, width, height, 200, 80) + additionalColor, bool gun, bool machineGun, int width, int height) : base(speed,weight, bodyColor, width, height, 200, 80) { if (EntityArmoredTransport != null) { EntityArmoredTransport = new EntityTank(speed, weight, bodyColor, - additionalColor, gun, machineGun); + additionalColor, gun, machineGun); } } public override void DrawTransport(Graphics g) diff --git a/ProjectTank/ProjectTank/EntityTank.cs b/ProjectTank/ProjectTank/EntityTank.cs index fcde423..136aca2 100644 --- a/ProjectTank/ProjectTank/EntityTank.cs +++ b/ProjectTank/ProjectTank/EntityTank.cs @@ -16,17 +16,14 @@ namespace ProjectTank.Entities /// Дополнительный цвет (для опциональных элементов) /// public Color AdditionalColor { get; private set; } - /// /// Пушка /// public bool Gun { get; private set; } - /// /// Пулемет /// public bool MachineGun { get; private set; } - /// /// Инициализация полей объекта-класса спортивного автомобиля ///