diff --git a/Cruiser/Cruiser/DrawningCruiser.cs b/Cruiser/Cruiser/DrawningCruiser.cs index 6d500a0..1b4f185 100644 --- a/Cruiser/Cruiser/DrawningCruiser.cs +++ b/Cruiser/Cruiser/DrawningCruiser.cs @@ -126,53 +126,37 @@ namespace Monorail.DrawningObjects return; } Pen pen = new Pen(Color.Black, 2); - //фюзеляж + g.DrawEllipse(pen, _startPosX + 15, _startPosY + 5, 20, 20); + g.DrawEllipse(pen, _startPosX + 15, _startPosY + 35, 20, 20); + g.DrawRectangle(pen, _startPosX + 9, _startPosY + 15, 10, 30); + g.DrawRectangle(pen, _startPosX + 90, _startPosY + 15, 10, + 30); + g.DrawRectangle(pen, _startPosX + 20, _startPosY + 4, 70, 52); Brush br = new SolidBrush(EntityPlane.BodyColor); - g.FillRectangle(br, _startPosX + 20, _startPosY + 70, 140, 20); - //кабина - Point[] point = new Point[3]{ - new Point(_startPosX + 0, _startPosY + 80), - new Point(_startPosX + 20, _startPosY + 70), - new Point(_startPosX + 20, _startPosY + 90) - }; - Brush cabin = new SolidBrush(Color.LightBlue); - g.FillPolygon(cabin, point); - //границы самолета - g.DrawPolygon(pen, point); - g.DrawRectangle(pen, _startPosX + 20, _startPosY + 70, 140, 20); - //Крылья - point = new Point[4] { - new Point(_startPosX + 70, _startPosY + 70), - new Point(_startPosX + 70, _startPosY + 0), - new Point(_startPosX + 90, _startPosY + 0), - new Point(_startPosX + 100, _startPosY + 70) - }; - g.FillPolygon(br, point); - g.DrawPolygon(pen, point); - point = new Point[4] { - new Point(_startPosX + 70, _startPosY + 90), - new Point(_startPosX + 70, _startPosY + 160), - new Point(_startPosX + 90, _startPosY + 160), - new Point(_startPosX + 100, _startPosY + 90) - }; - g.FillPolygon(br, point); - g.DrawPolygon(pen, point); - point = new Point[4] { - new Point(_startPosX + 130, _startPosY + 70), - new Point(_startPosX + 130, _startPosY + 50), - new Point(_startPosX + 160, _startPosY + 30), - new Point(_startPosX + 160, _startPosY + 70) - }; - g.FillPolygon(br, point); - g.DrawPolygon(pen, point); - point = new Point[4] { - new Point(_startPosX + 130, _startPosY + 90), - new Point(_startPosX + 130, _startPosY + 110), - new Point(_startPosX + 160, _startPosY + 130), - new Point(_startPosX + 160, _startPosY + 90) - }; - g.FillPolygon(br, point); - g.DrawPolygon(pen, point); + g.FillRectangle(br, _startPosX + 10, _startPosY + 15, 10, 30); + g.FillRectangle(br, _startPosX + 90, _startPosY + 15, 10, 30); + g.FillRectangle(br, _startPosX + 20, _startPosY + 5, 70, 50); + Point[] points = new Point[3];// нос лодки + points[0] = new Point(_startPosX + 100, _startPosY + 5); + points[1] = new Point(_startPosX + 100, _startPosY + 55); + points[2] = new Point(_startPosX + 100 + 50, _startPosY + 50 / 2); + g.FillPolygon(Brushes.Pink, points); + //границы носа лодки + Point[] points1 = new Point[3];// нос лодки + points1[0] = new Point(_startPosX + 100, _startPosY + 5); + points1[1] = new Point(_startPosX + 100, _startPosY + 55); + points1[2] = new Point(_startPosX + 100 + 50, _startPosY + 50 / 2); + g.DrawPolygon(pen, points1); + g.FillRectangle(Brushes.Black, _startPosX + 5, _startPosY + 15, 10, 10); + g.FillRectangle(Brushes.Black, _startPosX + 5, _startPosY + 35, 10, 10); + + //если есть ракетные шахты, добавить условие + g.DrawRectangle(Pens.Black, _startPosX + 35, + _startPosY + 23, 15, 15); + g.DrawRectangle(Pens.Black, _startPosX + 50, + _startPosY + 19, 30, 25); + + } } diff --git a/Cruiser/Cruiser/MonorailGenericCollection.cs b/Cruiser/Cruiser/MonorailGenericCollection.cs index 41783fb..d5b6480 100644 --- a/Cruiser/Cruiser/MonorailGenericCollection.cs +++ b/Cruiser/Cruiser/MonorailGenericCollection.cs @@ -25,11 +25,11 @@ namespace Monorail.Generics /// /// Размер занимаемого объектом места (ширина) /// - private readonly int _placeSizeWidth = 170; + private readonly int _placeSizeWidth = 210; /// /// Размер занимаемого объектом места (высота) /// - private readonly int _placeSizeHeight = 200; + private readonly int _placeSizeHeight = 90; /// /// Набор объектов /// @@ -105,12 +105,12 @@ namespace Monorail.Generics for (int j = 0; j < _pictureHeight / _placeSizeHeight + 1; ++j) {//линия разметки места - g.DrawLine(pen, i * _placeSizeWidth + 10, j * - _placeSizeHeight, i * _placeSizeWidth + _placeSizeWidth / 2 + 50, j * - _placeSizeHeight); + g.DrawLine(pen, i * _placeSizeWidth, j * + _placeSizeHeight, i * _placeSizeWidth + _placeSizeWidth / 2, j * + _placeSizeHeight); } - g.DrawLine(pen, i * _placeSizeWidth + 10, 0, i * - _placeSizeWidth + 10, _pictureHeight / _placeSizeHeight * _placeSizeHeight); + g.DrawLine(pen, i * _placeSizeWidth, 0, i * + _placeSizeWidth, _pictureHeight / _placeSizeHeight * _placeSizeHeight); } } /// @@ -125,7 +125,7 @@ namespace Monorail.Generics if (plane != null) { int inRow = _pictureWidth / _placeSizeWidth; - plane.SetPosition(_pictureWidth - _placeSizeWidth - (i % inRow * _placeSizeWidth) - _placeSizeHeight / 2 - 8, i / inRow * _placeSizeHeight + 20); + plane.SetPosition((i % inRow) * (_placeSizeWidth) + _placeSizeWidth / 20, _placeSizeHeight * (i / inRow) + _placeSizeHeight / 20); plane.DrawTransport(g); } i++;