diff --git a/AirplaneWithRadar/ProjectAirplaneWithRadar/Drawnings/DrawingAirplaneWithRadar.cs b/AirplaneWithRadar/ProjectAirplaneWithRadar/Drawnings/DrawingAirplaneWithRadar.cs
index d410403..1e97679 100644
--- a/AirplaneWithRadar/ProjectAirplaneWithRadar/Drawnings/DrawingAirplaneWithRadar.cs
+++ b/AirplaneWithRadar/ProjectAirplaneWithRadar/Drawnings/DrawingAirplaneWithRadar.cs
@@ -15,10 +15,10 @@ namespace ProjectAirplaneWithRadar.Drawnings
/// Основной цвет
/// Дополнительный цвет
/// Шасси
- /// Ракета
- public DrawingAirplaneWithRadar(int speed, double weight, Color bodyColor, Color additionalColor, bool wheels, bool rocket) : base(150, 93)
+ /// Радар
+ public DrawingAirplaneWithRadar(int speed, double weight, Color bodyColor, Color additionalColor, bool wheels, bool radar) : base(150, 93)
{
- EntityAirplane = new EntityAirplaneWithRadar(speed, weight, bodyColor, additionalColor, wheels, rocket);
+ EntityAirplane = new EntityAirplaneWithRadar(speed, weight, bodyColor, additionalColor, wheels, radar);
}
public override void DrawTransport(Graphics g)
@@ -45,31 +45,27 @@ namespace ProjectAirplaneWithRadar.Drawnings
//Передняя стойка
g.DrawRectangle(pen, _startPosX.Value + 95, _startPosY.Value + 80, 5, 10);
- g.FillRectangle(additionalBrush, _startPosX.Value + 95, _startPosY.Value + 80, 5, 10);
+ g.FillRectangle(additionalBrush, _startPosX.Value + 95, _startPosY.Value +80, 5, 10);
g.DrawEllipse(pen, _startPosX.Value + 92, _startPosY.Value + 85, 10, 10);
g.FillEllipse(additionalBrush, _startPosX.Value + 92, _startPosY.Value + 85, 10, 10);
}
- //_startPosY += 10;
+ _startPosY += 10;
base.DrawTransport(g);
- //_startPosY -= 10;
+ _startPosY -= 10;
- //Ракета воздух-воздух
- if (airplaneWithRadar.Rocket)
+ //Радар
+ if (airplaneWithRadar.Radar)
{
- g.DrawRectangle(pen, _startPosX.Value + 50, _startPosY.Value + 70, 2, 5);
- g.FillRectangle(additionalBrush, _startPosX.Value + 50, _startPosY.Value + 70, 2, 5);
+ g.DrawRectangle(pen, _startPosX.Value + 70, _startPosY.Value + 40, 10, 10);
+ g.FillRectangle(additionalBrush, _startPosX.Value + 70, _startPosY.Value + 40, 10, 10);
- g.DrawRectangle(pen, _startPosX.Value + 80, _startPosY.Value + 70, 2, 5);
- g.FillRectangle(additionalBrush, _startPosX.Value + 80, _startPosY.Value + 70, 2, 5);
+ g.DrawEllipse(pen, _startPosX.Value + 50, _startPosY.Value + 30, 50, 10);
+ g.FillEllipse(additionalBrush, _startPosX.Value + 50, _startPosY.Value + 30, 50, 10);
+ }
- g.DrawRectangle(pen, _startPosX.Value + 40, _startPosY.Value + 75, 50, 5);
- g.FillRectangle(additionalBrush, _startPosX.Value + 40, _startPosY.Value + 75, 50, 5);
- }
-
-
- }
+ }
}
}
diff --git a/AirplaneWithRadar/ProjectAirplaneWithRadar/Drawnings/DrawningAirplane.cs b/AirplaneWithRadar/ProjectAirplaneWithRadar/Drawnings/DrawningAirplane.cs
index 14607f3..ca52982 100644
--- a/AirplaneWithRadar/ProjectAirplaneWithRadar/Drawnings/DrawningAirplane.cs
+++ b/AirplaneWithRadar/ProjectAirplaneWithRadar/Drawnings/DrawningAirplane.cs
@@ -228,40 +228,41 @@ namespace ProjectAirplaneWithRadar.Drawnings
Pen pen = new(Color.Black);
+
//Корпус
- g.DrawRectangle(pen, _startPosX.Value + 10, _startPosY.Value + 50, 100, 30);
+ g.DrawRectangle(pen, _startPosX.Value + 10, _startPosY.Value + 40, 100, 30);
//Хвост
Point[] points = {
new Point(_startPosX.Value + 10, _startPosY.Value),
- new Point(_startPosX.Value + 10, _startPosY.Value + 50),
- new Point(_startPosX.Value + 50, _startPosY.Value + 50)
+ new Point(_startPosX.Value + 10, _startPosY.Value + 40),
+ new Point(_startPosX.Value + 50, _startPosY.Value + 40)
};
g.DrawPolygon(pen, points);
//Кабина
Point[] points2 = {
- new Point(_startPosX.Value + 110, _startPosY.Value + 45),
- new Point(_startPosX.Value + 110, _startPosY.Value + 65),
- new Point(_startPosX.Value + 150, _startPosY.Value + 65)
+ new Point(_startPosX.Value + 110, _startPosY.Value + 35),
+ new Point(_startPosX.Value + 110, _startPosY.Value + 55),
+ new Point(_startPosX.Value + 150, _startPosY.Value + 55)
};
g.DrawPolygon(pen, points2);
Point[] points3 = {
- new Point(_startPosX.Value + 110, _startPosY.Value + 65),
- new Point(_startPosX.Value + 110, _startPosY.Value + 85),
- new Point(_startPosX.Value + 150, _startPosY.Value + 65)
+ new Point(_startPosX.Value + 110, _startPosY.Value + 55),
+ new Point(_startPosX.Value + 110, _startPosY.Value + 75),
+ new Point(_startPosX.Value + 150, _startPosY.Value + 55)
};
g.DrawPolygon(pen, points3);
//Крыло
- Brush brBlack = new SolidBrush(Color.Black);
- g.DrawEllipse(pen, _startPosX.Value + 30, _startPosY.Value + 60, 70, 10);
- g.FillEllipse(brBlack, _startPosX.Value + 30, _startPosY.Value + 60, 70, 10);
+ Brush brBlack = new SolidBrush(EntityAirplane.BodyColor);
+ g.DrawEllipse(pen, _startPosX.Value + 30, _startPosY.Value + 50, 70, 10);
+ g.FillEllipse(brBlack, _startPosX.Value + 30, _startPosY.Value + 50, 70, 10);
//Хвостовой элерон
- g.DrawEllipse(pen, _startPosX.Value, _startPosY.Value + 45, 30, 10);
- g.FillEllipse(brBlack, _startPosX.Value, _startPosY.Value + 45, 30, 10);
+ g.DrawEllipse(pen, _startPosX.Value, _startPosY.Value + 35, 30, 10);
+ g.FillEllipse(brBlack, _startPosX.Value, _startPosY.Value + 35, 30, 10);
}
}
diff --git a/AirplaneWithRadar/ProjectAirplaneWithRadar/Entities/EntityAirplaneWithRadar.cs b/AirplaneWithRadar/ProjectAirplaneWithRadar/Entities/EntityAirplaneWithRadar.cs
index e6d802a..ff6d5e8 100644
--- a/AirplaneWithRadar/ProjectAirplaneWithRadar/Entities/EntityAirplaneWithRadar.cs
+++ b/AirplaneWithRadar/ProjectAirplaneWithRadar/Entities/EntityAirplaneWithRadar.cs
@@ -18,7 +18,7 @@
///
/// Признак (опция) наличия ракеты
///
- public bool Rocket { get; private set; }
+ public bool Radar { get; private set; }
///
/// Шаг перемещения автомобиля
@@ -33,12 +33,12 @@
/// Основной цвет
/// Дополнительный цвет
/// Шасси
- /// Ракета
- public EntityAirplaneWithRadar(int speed, double weight, Color bodyColor, Color additionalColor, bool wheels, bool rocket) : base(speed, weight, bodyColor)
+ /// Радар
+ public EntityAirplaneWithRadar(int speed, double weight, Color bodyColor, Color additionalColor, bool wheels, bool radar) : base(speed, weight, bodyColor)
{
AdditionalColor = additionalColor;
Wheels = wheels;
- Rocket = rocket;
+ Radar = radar;
}
}
}