Пририсовка радара
This commit is contained in:
parent
d221bfd6e4
commit
81abe4736a
@ -49,11 +49,11 @@
|
|||||||
/// <param name="bodyColor">Основной цвет</param>
|
/// <param name="bodyColor">Основной цвет</param>
|
||||||
/// <param name="additionalColor">Дополнительный цвет</param>
|
/// <param name="additionalColor">Дополнительный цвет</param>
|
||||||
/// <param name="wheels">Шасси</param>
|
/// <param name="wheels">Шасси</param>
|
||||||
/// <param name="rocket">Ракета</param>
|
/// <param name="radar">Радар</param>
|
||||||
public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool wheels, bool rocket)
|
public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool wheels, bool radar)
|
||||||
{
|
{
|
||||||
EntityAirplaneWithRadar = new EntityAirplaneWithRadar();
|
EntityAirplaneWithRadar = new EntityAirplaneWithRadar();
|
||||||
EntityAirplaneWithRadar.Init(speed, weight, bodyColor, additionalColor, wheels, rocket);
|
EntityAirplaneWithRadar.Init(speed, weight, bodyColor, additionalColor, wheels, radar);
|
||||||
_pictureWidth = null;
|
_pictureWidth = null;
|
||||||
_pictureHeight = null;
|
_pictureHeight = null;
|
||||||
_startPosX = null;
|
_startPosX = null;
|
||||||
@ -216,17 +216,14 @@
|
|||||||
g.FillEllipse(additionalBrush, _startPosX.Value + 92, _startPosY.Value + 85, 10, 10);
|
g.FillEllipse(additionalBrush, _startPosX.Value + 92, _startPosY.Value + 85, 10, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Ракета воздух-воздух
|
//Радар
|
||||||
if (EntityAirplaneWithRadar.Rocket)
|
if (EntityAirplaneWithRadar.Radar)
|
||||||
{
|
{
|
||||||
g.DrawRectangle(pen, _startPosX.Value + 50, _startPosY.Value + 70, 2, 5);
|
g.DrawRectangle(pen, _startPosX.Value + 70, _startPosY.Value + 40, 10, 10);
|
||||||
g.FillRectangle(additionalBrush, _startPosX.Value + 50, _startPosY.Value + 70, 2, 5);
|
g.FillRectangle(additionalBrush, _startPosX.Value + 70, _startPosY.Value + 40, 10, 10);
|
||||||
|
|
||||||
g.DrawRectangle(pen, _startPosX.Value + 80, _startPosY.Value + 70, 2, 5);
|
g.DrawEllipse(pen, _startPosX.Value + 50, _startPosY.Value + 30, 50, 10);
|
||||||
g.FillRectangle(additionalBrush, _startPosX.Value + 80, _startPosY.Value + 70, 2, 5);
|
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Корпус
|
//Корпус
|
||||||
|
@ -31,9 +31,9 @@
|
|||||||
public bool Wheels { get; private set; }
|
public bool Wheels { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Признак (опция) наличия ракеты
|
/// Признак (опция) наличия радар
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool Rocket { get; private set; }
|
public bool Radar { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Шаг перемещения автомобиля
|
/// Шаг перемещения автомобиля
|
||||||
@ -48,15 +48,15 @@
|
|||||||
/// <param name="bodyColor">Основной цвет</param>
|
/// <param name="bodyColor">Основной цвет</param>
|
||||||
/// <param name="additionalColor">Дополнительный цвет</param>
|
/// <param name="additionalColor">Дополнительный цвет</param>
|
||||||
/// <param name="wheels">Шасси</param>
|
/// <param name="wheels">Шасси</param>
|
||||||
/// <param name="rocket">Ракета</param>
|
/// <param name="radar">Радар</param>
|
||||||
public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool wheels, bool rocket)
|
public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool wheels, bool radar)
|
||||||
{
|
{
|
||||||
Speed = speed;
|
Speed = speed;
|
||||||
Weight = weight;
|
Weight = weight;
|
||||||
BodyColor = bodyColor;
|
BodyColor = bodyColor;
|
||||||
AdditionalColor = additionalColor;
|
AdditionalColor = additionalColor;
|
||||||
Wheels = wheels;
|
Wheels = wheels;
|
||||||
Rocket = rocket;
|
Radar = radar;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user