diff --git a/ProjectExcavator/ProjectExcavator/DrawningExcavator.cs b/ProjectExcavator/ProjectExcavator/DrawningExcavator.cs index 17571fc..566c90e 100644 --- a/ProjectExcavator/ProjectExcavator/DrawningExcavator.cs +++ b/ProjectExcavator/ProjectExcavator/DrawningExcavator.cs @@ -31,11 +31,11 @@ namespace ProjectExcavator /// /// Ширина прорисовки экскаватора /// - private readonly int _excavatorWidth = 200; + private readonly int _excavatorWidth = 185; /// /// Высота прорисовки экскаватора /// - private readonly int _excavatorHeight = 150; + private readonly int _excavatorHeight = 100; /// /// Инициализация свойств /// @@ -95,7 +95,7 @@ namespace ProjectExcavator break; //вверх case DirectionType.Up: - if (_startPosY - EntityExcavator.Step > -50) + if (_startPosY - EntityExcavator.Step > 0) { _startPosY -= (int)EntityExcavator.Step; } @@ -130,41 +130,41 @@ namespace ProjectExcavator Brush additionalBrush = new SolidBrush(EntityExcavator.AdditionalColor); if (EntityExcavator.BodyKit) { - g.FillRectangle(additionalBrush, _startPosX + 20, _startPosY + 120, 130, 10); - g.DrawLine(pen, _startPosX + 20, _startPosY + 120, _startPosX + 150, _startPosY + 120); + g.FillRectangle(additionalBrush, _startPosX + 20, _startPosY + 70, 130, 10); + g.DrawLine(pen, _startPosX + 20, _startPosY + 70, _startPosX + 150, _startPosY + 70); } //корпус Brush bodyBrush = new SolidBrush(Color.Red); - g.FillRectangle(bodyBrush, _startPosX + 20, _startPosY + 110, 130, 20); - g.FillRectangle(bodyBrush, _startPosX + 100, _startPosY + 70, 30, 40); - g.FillRectangle(bodyBrush, _startPosX + 30, _startPosY + 90, 10, 20); - g.DrawRectangle(pen, _startPosX + 20, _startPosY + 110, 130, 20); - g.DrawRectangle(pen, _startPosX + 100, _startPosY + 70, 30, 40); - g.DrawRectangle(pen, _startPosX + 30, _startPosY + 90, 10, 20); + g.FillRectangle(bodyBrush, _startPosX + 20, _startPosY + 60, 130, 20); + g.FillRectangle(bodyBrush, _startPosX + 100, _startPosY + 20, 30, 40); + g.FillRectangle(bodyBrush, _startPosX + 30, _startPosY + 40, 10, 20); + g.DrawRectangle(pen, _startPosX + 20, _startPosY + 60, 130, 20); + g.DrawRectangle(pen, _startPosX + 100, _startPosY + 20, 30, 40); + g.DrawRectangle(pen, _startPosX + 30, _startPosY + 40, 10, 20); //гусеница Point[] points = { - new Point(_startPosX + 20, _startPosY + 130), - new Point(_startPosX + 15, _startPosY+ 135), - new Point(_startPosX + 15, _startPosY + 145), - new Point(_startPosX + 20, _startPosY + 150), - new Point(_startPosX + 145, _startPosY + 150), - new Point(_startPosX + 150, _startPosY + 145), - new Point(_startPosX + 150, _startPosY + 135), - new Point(_startPosX + 145, _startPosY + 130)}; + new Point(_startPosX + 20, _startPosY + 80), + new Point(_startPosX + 15, _startPosY+ 85), + new Point(_startPosX + 15, _startPosY + 95), + new Point(_startPosX + 20, _startPosY + 100), + new Point(_startPosX + 145, _startPosY + 100), + new Point(_startPosX + 150, _startPosY + 95), + new Point(_startPosX + 150, _startPosY + 85), + new Point(_startPosX + 145, _startPosY + 80)}; g.DrawPolygon(pen, points); - g.DrawEllipse(pen, _startPosX + 20, _startPosY + 130, 20, 20); - g.DrawEllipse(pen, _startPosX + 40, _startPosY + 130, 20, 20); - g.DrawEllipse(pen, _startPosX + 60, _startPosY + 130, 20, 20); - g.DrawEllipse(pen, _startPosX + 80, _startPosY + 130, 20, 20); - g.DrawEllipse(pen, _startPosX + 100, _startPosY + 130, 20, 20); - g.DrawEllipse(pen, _startPosX + 120, _startPosY + 130, 20, 20); + g.DrawEllipse(pen, _startPosX + 20, _startPosY + 80, 20, 20); + g.DrawEllipse(pen, _startPosX + 40, _startPosY + 80, 20, 20); + g.DrawEllipse(pen, _startPosX + 60, _startPosY + 80, 20, 20); + g.DrawEllipse(pen, _startPosX + 80, _startPosY + 80, 20, 20); + g.DrawEllipse(pen, _startPosX + 100, _startPosY + 80, 20, 20); + g.DrawEllipse(pen, _startPosX + 120, _startPosY + 80, 20, 20); //ковш if (EntityExcavator.Backet) { Point[] pointsBacket = { - new Point(_startPosX + 150, _startPosY + 75), - new Point(_startPosX + 150, _startPosY + 135), - new Point(_startPosX + 195, _startPosY + 135), + new Point(_startPosX + 150, _startPosY + 25), + new Point(_startPosX + 150, _startPosY + 85), + new Point(_startPosX + 195, _startPosY + 85), }; g.FillPolygon(additionalBrush, pointsBacket); g.DrawPolygon(pen, pointsBacket); diff --git a/ProjectExcavator/ProjectExcavator/EntityExcavator.cs b/ProjectExcavator/ProjectExcavator/EntityExcavator.cs index 6189140..8581d88 100644 --- a/ProjectExcavator/ProjectExcavator/EntityExcavator.cs +++ b/ProjectExcavator/ProjectExcavator/EntityExcavator.cs @@ -46,7 +46,6 @@ namespace ProjectExcavator /// Дополнительный цвет /// Признак наличия обвеса /// Признак наличия антикрыла - public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool bodyKit, bool backet) {