Karamushko M.K lab2_base #4
@ -8,11 +8,11 @@ namespace AirFighter
|
||||
{
|
||||
internal class DrawingModernAirFighter : DrawingAirFighter
|
||||
{
|
||||
public DrawingModernAirFighter(int speed, float weight, Color bodyColor, Color dopColor, bool dopWings, bool rockets, bool sportLine) :
|
||||
public DrawingModernAirFighter(int speed, float weight, Color bodyColor, Color dopColor, bool dopWings, bool rockets) :
|
||||
base(speed, weight, bodyColor, 195, 166)
|
||||
{
|
||||
AirFighter = new EntityModernAirFighter(speed, weight, bodyColor, dopColor, dopWings,
|
||||
rockets, sportLine);
|
||||
rockets);
|
||||
}
|
||||
public override void DrawTransport(Graphics g)
|
||||
{
|
||||
|
@ -10,40 +10,18 @@ namespace AirFighter
|
||||
{
|
||||
internal class EntityModernAirFighter : EntityAirFighter
|
||||
{
|
||||
/// <summary>
|
||||
/// Дополнительный цвет
|
||||
/// </summary>
|
||||
public Color DopColor { get; private set; }
|
||||
/// <summary>
|
||||
/// Признак наличия обвеса
|
||||
/// </summary>
|
||||
public bool DopWings { get; private set; }
|
||||
/// <summary>
|
||||
/// Признак наличия антикрыла
|
||||
/// </summary>
|
||||
public bool Rockets { get; private set; }
|
||||
/// <summary>
|
||||
/// Признак наличия гоночной полосы
|
||||
/// </summary>
|
||||
public bool SportLine { get; private set; }
|
||||
/// <summary>
|
||||
/// Инициализация свойств
|
||||
/// </summary>
|
||||
/// <param name="speed">Скорость</param>
|
||||
/// <param name="weight">Вес автомобиля</param>
|
||||
/// <param name="bodyColor">Цвет кузова</param>
|
||||
/// <param name="dopColor">Дополнительный цвет</param>
|
||||
/// <param name="bodyKit">Признак наличия обвеса</param>
|
||||
/// <param name="wing">Признак наличия антикрыла</param>
|
||||
/// <param name="sportLine">Признак наличия гоночной полосы</param>
|
||||
|
||||
|
||||
public EntityModernAirFighter(int speed, float weight, Color bodyColor, Color
|
||||
dopColor, bool dopWings, bool rockets, bool sportLine) :
|
||||
dopColor, bool dopWings, bool rockets) :
|
||||
base(speed, weight, bodyColor)
|
||||
{
|
||||
DopColor = dopColor;
|
||||
DopWings = dopWings;
|
||||
Rockets = rockets;
|
||||
SportLine = sportLine;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
4
AirFighter/AirFighter/FormAirFighter.Designer.cs
generated
4
AirFighter/AirFighter/FormAirFighter.Designer.cs
generated
@ -50,7 +50,7 @@
|
||||
this.CreateButton.Name = "CreateButton";
|
||||
this.CreateButton.Size = new System.Drawing.Size(94, 29);
|
||||
this.CreateButton.TabIndex = 0;
|
||||
this.CreateButton.Text = "create";
|
||||
this.CreateButton.Text = "создание";
|
||||
this.CreateButton.UseVisualStyleBackColor = true;
|
||||
this.CreateButton.Click += new System.EventHandler(this.CreateButton_Click);
|
||||
//
|
||||
@ -155,7 +155,7 @@
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(148, 29);
|
||||
this.button1.TabIndex = 7;
|
||||
this.button1.Text = "create modern";
|
||||
this.button1.Text = "модификация";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.CreateModernButton_Click);
|
||||
//
|
||||
|
@ -36,8 +36,7 @@ namespace AirFighter
|
||||
_airFighter = new DrawingModernAirFighter(rnd.Next(100, 300), rnd.Next(1000,2000),
|
||||
Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0,256)),
|
||||
Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0,256)),
|
||||
Convert.ToBoolean(rnd.Next(0, 2)), Convert.ToBoolean(rnd.Next(0,2)),
|
||||
Convert.ToBoolean(rnd.Next(0, 2)));
|
||||
Convert.ToBoolean(rnd.Next(0, 2)), Convert.ToBoolean(rnd.Next(0,2)));
|
||||
|
||||
|
||||
_airFighter.SetPosition(rnd.Next(10, 100), rnd.Next(10, 100), pictureBox.Width, pictureBox.Height);
|
||||
|
@ -48,8 +48,7 @@ namespace AirFighter
|
||||
_airFighter = new DrawingModernAirFighter(rnd.Next(100, 300), rnd.Next(1000, 2000),
|
||||
Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0, 256)),
|
||||
Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0, 256)),
|
||||
Convert.ToBoolean(rnd.Next(0, 2)), Convert.ToBoolean(rnd.Next(0, 2)),
|
||||
Convert.ToBoolean(rnd.Next(0, 2)));
|
||||
Convert.ToBoolean(rnd.Next(0, 2)), Convert.ToBoolean(rnd.Next(0, 2)));
|
||||
|
||||
|
||||
SetData(_airFighter);
|
||||
|
Loading…
Reference in New Issue
Block a user