PIbd-13_Ladyagin_P.D. LabWork01 Simple #1
@ -49,11 +49,11 @@
|
||||
/// <param name="bodyColor">Основной цвет</param>
|
||||
/// <param name="additionalColor">Дополнительный цвет</param>
|
||||
/// <param name="wheels">Шасси</param>
|
||||
/// <param name="rocket">Ракета</param>
|
||||
public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool wheels, bool rocket)
|
||||
/// <param name="radar">Радар</param>
|
||||
public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool wheels, bool radar)
|
||||
{
|
||||
EntityAirplaneWithRadar = new EntityAirplaneWithRadar();
|
||||
EntityAirplaneWithRadar.Init(speed, weight, bodyColor, additionalColor, wheels, rocket);
|
||||
EntityAirplaneWithRadar.Init(speed, weight, bodyColor, additionalColor, wheels, radar);
|
||||
_pictureWidth = null;
|
||||
_pictureHeight = null;
|
||||
_startPosX = null;
|
||||
@ -216,17 +216,14 @@
|
||||
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.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.DrawRectangle(pen, _startPosX.Value + 40, _startPosY.Value + 75, 50, 5);
|
||||
g.FillRectangle(additionalBrush, _startPosX.Value + 40, _startPosY.Value + 75, 50, 5);
|
||||
g.DrawEllipse(pen, _startPosX.Value + 50, _startPosY.Value + 30, 50, 10);
|
||||
g.FillEllipse(additionalBrush, _startPosX.Value + 50, _startPosY.Value + 30, 50, 10);
|
||||
}
|
||||
|
||||
//Корпус
|
||||
@ -262,7 +259,7 @@
|
||||
//Хвостовой элерон
|
||||
g.DrawEllipse(pen, _startPosX.Value, _startPosY.Value + 45, 30, 10);
|
||||
g.FillEllipse(brBlack, _startPosX.Value, _startPosY.Value + 45, 30, 10);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -31,9 +31,9 @@
|
||||
public bool Wheels { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Признак (опция) наличия ракеты
|
||||
/// Признак (опция) наличия радар
|
||||
/// </summary>
|
||||
public bool Rocket { get; private set; }
|
||||
public bool Radar { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Шаг перемещения автомобиля
|
||||
@ -48,15 +48,15 @@
|
||||
/// <param name="bodyColor">Основной цвет</param>
|
||||
/// <param name="additionalColor">Дополнительный цвет</param>
|
||||
/// <param name="wheels">Шасси</param>
|
||||
/// <param name="rocket">Ракета</param>
|
||||
public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool wheels, bool rocket)
|
||||
/// <param name="radar">Радар</param>
|
||||
public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool wheels, bool radar)
|
||||
{
|
||||
Speed = speed;
|
||||
Weight = weight;
|
||||
BodyColor = bodyColor;
|
||||
AdditionalColor = additionalColor;
|
||||
Wheels = wheels;
|
||||
Rocket = rocket;
|
||||
Radar = radar;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user