diff --git a/AntiAircraftGun/DirectionAntiAircraftGun.cs b/AntiAircraftGun/Drawnings/DirectionAntiAircraftGun.cs
similarity index 90%
rename from AntiAircraftGun/DirectionAntiAircraftGun.cs
rename to AntiAircraftGun/Drawnings/DirectionAntiAircraftGun.cs
index 05de63e..6752918 100644
--- a/AntiAircraftGun/DirectionAntiAircraftGun.cs
+++ b/AntiAircraftGun/Drawnings/DirectionAntiAircraftGun.cs
@@ -1,5 +1,4 @@
-
-namespace AntiAircraftGun;
+namespace AntiAircraftGun.Drawnings;
///
/// Направление перемещения
///
diff --git a/AntiAircraftGun/DrawningAntiAircraftGun.cs b/AntiAircraftGun/Drawnings/DrawningAircraftGun.cs
similarity index 66%
rename from AntiAircraftGun/DrawningAntiAircraftGun.cs
rename to AntiAircraftGun/Drawnings/DrawningAircraftGun.cs
index 4652200..956c698 100644
--- a/AntiAircraftGun/DrawningAntiAircraftGun.cs
+++ b/AntiAircraftGun/Drawnings/DrawningAircraftGun.cs
@@ -1,56 +1,101 @@
-namespace AntiAircraftGun;
-///
-/// Класс отвечающий за прорисовку и перемещение объекта - сущности
-///
-public class DrawningAntiAircraftGun
+using AntiAircraftGun.Entities;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AntiAircraftGun.Drawnings;
+
+public class DrawningAircraftGun
{
///
- /// Класс - сущность
+ /// Класс-сущность
///
- public EntityAntiAircraftGun? EntityAntiAircraftGun { get; set; }
+ public EntityAircraftGun? EntityAircraftGun { get; protected set; }
+
///
- /// Ширина окна
+ /// Ширина
///
private int? _pictureWidth;
+
///
- /// Высота окна
+ /// Высота
///
private int? _pictureHeight;
+
///
/// Левая координата прорисовки зенитной установки
///
- private int? _startPosX;
+ protected int? _startPosX;
+
///
/// Верхняя координата прорисовки зенитной установки
///
- private int? _startPosY;
+ protected int? _startPosY;
+
///
/// Ширина прорисовки зенитной установки
///
- private readonly int _drawningGunWidth = 130;
+ private readonly int _drawningGunWidth = 129;
+
///
/// Высота прорисовки зенитной установки
///
- private readonly int _drawningGunHeight = 100;
+ private readonly int _drawningGunHeight = 105;
+
///
- /// Инициализация полей объекта-класса зенитной установки
+ /// Координата Х объекта
///
- /// Скорость
- /// Вес
- /// Основной цвет
- /// Дополнительный цвет
- /// Наличие обвеса
- /// Наличие башни
- /// Наличие радара
- public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool bodyKit, bool tower, bool radar)
+ public int? GetPosX => _startPosX;
+
+ ///
+ /// Координата Y объекта
+ ///
+ public int? GetPosY => _startPosY;
+
+ ///
+ /// Ширина объекта
+ ///
+ public int GetWidth => _drawningGunWidth;
+
+ ///
+ /// Высота объекта
+ ///
+ public int GetHeight => _drawningGunHeight;
+
+ ///
+ /// Пустой конструктор
+ ///
+ private DrawningAircraftGun()
{
- EntityAntiAircraftGun = new EntityAntiAircraftGun();
- EntityAntiAircraftGun.Init(speed, weight, bodyColor, additionalColor, bodyKit, tower, radar);
_pictureWidth = null;
_pictureHeight = null;
_startPosX = null;
_startPosY = null;
}
+
+ ///
+ /// Конструктор
+ ///
+ /// Скорость
+ /// Вес
+ /// Основной цвет
+ public DrawningAircraftGun(int speed, double weight, Color bodyColor) : this()
+ {
+ EntityAircraftGun = new EntityAircraftGun(speed, weight, bodyColor);
+ }
+
+ ///
+ /// Конструктор для наследников
+ ///
+ /// Ширина прорисовки зенитной установки
+ /// Высота прорисовки зенитной установки
+ protected DrawningAircraftGun(int drawningGunWidth, int drawningGunHeight) : this()
+ {
+ _drawningGunWidth = drawningGunWidth;
+ _drawningGunHeight = drawningGunHeight;
+ }
///
/// Установка границ поля
///
@@ -133,34 +178,34 @@ public class DrawningAntiAircraftGun
///
public bool MoveTransport(DirectionType direction)
{
- if (EntityAntiAircraftGun == null || !_startPosX.HasValue || !_startPosY.HasValue)
+ if (EntityAircraftGun == null || !_startPosX.HasValue || !_startPosY.HasValue)
{
return false;
}
switch (direction)
{
case DirectionType.Left:
- if (_startPosX.Value - EntityAntiAircraftGun.Step > 0)
+ if (_startPosX.Value - EntityAircraftGun.Step > 0)
{
- _startPosX -= (int)EntityAntiAircraftGun.Step;
+ _startPosX -= (int)EntityAircraftGun.Step;
}
return true;
case DirectionType.Right:
- if (_startPosX.Value + _drawningGunWidth + EntityAntiAircraftGun.Step < _pictureWidth)
+ if (_startPosX.Value + _drawningGunWidth + EntityAircraftGun.Step < _pictureWidth)
{
- _startPosX += (int)EntityAntiAircraftGun.Step;
+ _startPosX += (int)EntityAircraftGun.Step;
}
return true;
case DirectionType.Down:
- if (_startPosY.Value + _drawningGunHeight + EntityAntiAircraftGun.Step < _pictureHeight)
+ if (_startPosY.Value + _drawningGunHeight + EntityAircraftGun.Step < _pictureHeight)
{
- _startPosY += (int)EntityAntiAircraftGun.Step;
+ _startPosY += (int)EntityAircraftGun.Step;
}
return true;
case DirectionType.Up: //вверх
- if (_startPosY - EntityAntiAircraftGun.Step > 0)
+ if (_startPosY - EntityAircraftGun.Step > 0)
{
- _startPosY -= (int)EntityAntiAircraftGun.Step;
+ _startPosY -= (int)EntityAircraftGun.Step;
}
return true;
default:
@@ -171,22 +216,21 @@ public class DrawningAntiAircraftGun
/// Прорисовка объекта
///
///
- public void DrawTransport(Graphics g)
+ public virtual void DrawTransport(Graphics g)
{
- if (EntityAntiAircraftGun == null || !_startPosX.HasValue || !_startPosY.HasValue)
+ if (EntityAircraftGun == null || !_startPosX.HasValue || !_startPosY.HasValue)
{
return;
}
Pen pen = new(Color.Black);
- Brush additionalBrush = new SolidBrush(EntityAntiAircraftGun.AdditionalColor);
g.DrawEllipse(pen, _startPosX.Value + 10, _startPosY.Value + 75, 30, 30);
g.DrawEllipse(pen, _startPosX.Value + 100, _startPosY.Value + 75, 30, 30);
g.DrawRectangle(pen, _startPosX.Value + 25, _startPosY.Value + 75, 90, 30);
//границы ЦВЕТ
- Brush brDarkSlateGray = new SolidBrush(EntityAntiAircraftGun.BodyColor);
+ Brush brDarkSlateGray = new SolidBrush(EntityAircraftGun.BodyColor);
g.FillRectangle(brDarkSlateGray, _startPosX.Value + 35, _startPosY.Value + 40, 35, 30);
g.FillEllipse(brDarkSlateGray, _startPosX.Value + 10, _startPosY.Value + 75, 30, 30);
g.FillEllipse(brDarkSlateGray, _startPosX.Value + 100, _startPosY.Value + 75, 30, 30);
@@ -220,26 +264,8 @@ public class DrawningAntiAircraftGun
g.FillRectangle(brDarkSlateGray, _startPosX.Value + 10, _startPosY.Value + 65, 120, 13);
- if (EntityAntiAircraftGun.Tower)
- {
- g.FillRectangle(additionalBrush, _startPosX.Value + 35, _startPosY.Value + 50, 35, 15);
- g.DrawRectangle(pen, _startPosX.Value + 35, _startPosY.Value + 50, 35, 15);
- g.DrawLine(pen, _startPosX.Value + 45, _startPosY.Value + 50, _startPosX.Value + 90, _startPosY.Value + 20);
- g.DrawLine(pen, _startPosX.Value + 60, _startPosY.Value + 50, _startPosX.Value + 95, _startPosY.Value + 27);
- g.DrawLine(pen, _startPosX.Value + 45, _startPosY.Value + 50, _startPosX.Value + 60, _startPosY.Value + 50);
- g.DrawLine(pen, _startPosX.Value + 90, _startPosY.Value + 20, _startPosX.Value + 95, _startPosY.Value + 27);
- g.DrawLine(pen, _startPosX.Value + 90, _startPosY.Value + 20, _startPosX.Value + 100, _startPosY.Value + 20);
- g.DrawLine(pen, _startPosX.Value + 100, _startPosY.Value + 20, _startPosX.Value + 95, _startPosY.Value + 27);
-
- }
-
- if (EntityAntiAircraftGun.Radar)
- {
- g.DrawLine(pen, _startPosX.Value + 20, _startPosY.Value + 65, _startPosX.Value + 20, _startPosY.Value + 40);
- g.FillRectangle(additionalBrush, _startPosX.Value + 10, _startPosY.Value + 40, 20, 20);
- g.DrawRectangle(pen, _startPosX.Value + 10, _startPosY.Value + 40, 20, 20);
- }
+
}
-}
\ No newline at end of file
+}
diff --git a/AntiAircraftGun/Drawnings/DrawningAntiAircraftGun.cs b/AntiAircraftGun/Drawnings/DrawningAntiAircraftGun.cs
new file mode 100644
index 0000000..8d34254
--- /dev/null
+++ b/AntiAircraftGun/Drawnings/DrawningAntiAircraftGun.cs
@@ -0,0 +1,64 @@
+using AntiAircraftGun.Entities;
+
+namespace AntiAircraftGun.Drawnings;
+///
+/// Класс отвечающий за прорисовку и перемещение объекта - сущности
+///
+public class DrawningAntiAircraftGun : DrawningAircraftGun
+{
+ ///
+ /// Конструктор
+ ///
+ /// Скорость
+ /// Вес
+ /// Основной цвет
+ /// Дополнительный цвет
+ /// Признак наличия обвесов
+ /// Признак наличия башни
+ /// Признак наличия радара
+
+ public DrawningAntiAircraftGun(int speed, double weight, Color bodyColor, Color additionalColor, bool bodyKit, bool radar, bool tower) : base(129, 60)
+ {
+ EntityAircraftGun = new EntityAntiAircraftGun(speed, weight, bodyColor, radar, tower, bodyKit, additionalColor);
+ }
+ ///
+ /// Прорисовка объекта
+ ///
+ ///
+ public override void DrawTransport(Graphics g)
+ {
+ if (EntityAircraftGun == null || EntityAircraftGun is not EntityAntiAircraftGun aircraftGun || !_startPosX.HasValue || !_startPosY.HasValue)
+ {
+ return;
+ }
+
+
+ Pen pen = new(Color.Black);
+ Brush additionalBrush = new SolidBrush(aircraftGun.AdditionalColor);
+
+ base.DrawTransport(g);
+
+
+ if (aircraftGun.Tower)
+ {
+ g.FillRectangle(additionalBrush, _startPosX.Value + 35, _startPosY.Value + 50, 35, 15);
+ g.DrawRectangle(pen, _startPosX.Value + 35, _startPosY.Value + 50, 35, 15);
+ g.DrawLine(pen, _startPosX.Value + 45, _startPosY.Value + 50, _startPosX.Value + 90, _startPosY.Value + 20);
+ g.DrawLine(pen, _startPosX.Value + 60, _startPosY.Value + 50, _startPosX.Value + 95, _startPosY.Value + 27);
+ g.DrawLine(pen, _startPosX.Value + 45, _startPosY.Value + 50, _startPosX.Value + 60, _startPosY.Value + 50);
+ g.DrawLine(pen, _startPosX.Value + 90, _startPosY.Value + 20, _startPosX.Value + 95, _startPosY.Value + 27);
+ g.DrawLine(pen, _startPosX.Value + 90, _startPosY.Value + 20, _startPosX.Value + 100, _startPosY.Value + 20);
+ g.DrawLine(pen, _startPosX.Value + 100, _startPosY.Value + 20, _startPosX.Value + 95, _startPosY.Value + 27);
+
+ }
+
+ if (aircraftGun.Radar)
+ {
+ g.DrawLine(pen, _startPosX.Value + 20, _startPosY.Value + 65, _startPosX.Value + 20, _startPosY.Value + 40);
+ g.FillRectangle(additionalBrush, _startPosX.Value + 10, _startPosY.Value + 40, 20, 20);
+ g.DrawRectangle(pen, _startPosX.Value + 10, _startPosY.Value + 40, 20, 20);
+ }
+
+
+ }
+}
\ No newline at end of file
diff --git a/AntiAircraftGun/Entities/EntityAircraftGun.cs b/AntiAircraftGun/Entities/EntityAircraftGun.cs
new file mode 100644
index 0000000..aba41af
--- /dev/null
+++ b/AntiAircraftGun/Entities/EntityAircraftGun.cs
@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AntiAircraftGun.Entities;
+
+public class EntityAircraftGun
+{
+ ///
+ /// Скорость
+ ///
+ public int Speed { get; private set; }
+ ///
+ /// Вес
+ ///
+ public double Weight { get; private set; }
+ ///
+ /// Основной цвет
+ ///
+ public Color BodyColor { get; private set; }
+ ///
+ /// Перемещение зенитной установки
+ ///
+ public double Step => Speed * 100 / Weight;
+
+ ///
+ /// Конструктор сущности
+ ///
+ ///
+ ///
+ ///
+ public EntityAircraftGun(int speed, double weight, Color bodyColor)
+ {
+ Speed = speed;
+ Weight = weight;
+ BodyColor = bodyColor;
+ }
+}
diff --git a/AntiAircraftGun/EntityAntiAircraftGun.cs b/AntiAircraftGun/Entities/EntityAntiAircraftGun.cs
similarity index 61%
rename from AntiAircraftGun/EntityAntiAircraftGun.cs
rename to AntiAircraftGun/Entities/EntityAntiAircraftGun.cs
index 86d6c8e..65ad7f2 100644
--- a/AntiAircraftGun/EntityAntiAircraftGun.cs
+++ b/AntiAircraftGun/Entities/EntityAntiAircraftGun.cs
@@ -1,20 +1,9 @@
-namespace AntiAircraftGun;
+namespace AntiAircraftGun.Entities;
///
/// Класс-сущность Зенитная установка
///
-public class EntityAntiAircraftGun
-{ ///
- /// Скорость
- ///
- public int Speed { get; private set; }
- ///
- /// Вес
- ///
- public double Weight { get; private set; }
- ///
- /// Основной цвет
- ///
- public Color BodyColor { get; private set; }
+public class EntityAntiAircraftGun : EntityAircraftGun
+{
///
/// Дополниетльный цвет
///
@@ -31,12 +20,9 @@ public class EntityAntiAircraftGun
/// Наличие радара
///
public bool Radar { get; private set; }
+
///
- /// Шаг перемещения гидросамолета
- ///
- public double Step => Speed * 100 / Weight;
- ///
- /// Инициализация полей объекта-класса гидросамолета
+ /// Инициализация полей объекта-класса зенитной установки
///
/// Скорость
/// Вес
@@ -45,14 +31,12 @@ public class EntityAntiAircraftGun
/// Наличие обвеса
/// Наличие башни
/// Наличие радара
- public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool bodyKit, bool tower, bool radar)
+ public EntityAntiAircraftGun(int speed, double weight, Color bodyColor, bool radar, bool tower, bool bodyKit, Color additionalColor) : base(speed, weight, bodyColor)
{
- Speed = speed;
- Weight = weight;
- BodyColor = bodyColor;
- AdditionalColor = additionalColor;
- BodyKit = bodyKit;
- Tower = tower;
+
Radar = radar;
+ Tower = tower;
+ BodyKit = bodyKit;
+ AdditionalColor = additionalColor;
}
}
diff --git a/AntiAircraftGun/FormAntiAircraftGun.Designer.cs b/AntiAircraftGun/FormAntiAircraftGun.Designer.cs
index 7d69786..362de52 100644
--- a/AntiAircraftGun/FormAntiAircraftGun.Designer.cs
+++ b/AntiAircraftGun/FormAntiAircraftGun.Designer.cs
@@ -29,11 +29,12 @@
private void InitializeComponent()
{
pictureBoxAntiAircraftGun = new PictureBox();
- buttonCreate = new Button();
buttonLeft = new Button();
buttonDown = new Button();
buttonRight = new Button();
buttonUp = new Button();
+ buttonCreate = new Button();
+ buttonCreatAircraftGun = new Button();
((System.ComponentModel.ISupportInitialize)pictureBoxAntiAircraftGun).BeginInit();
SuspendLayout();
//
@@ -46,17 +47,6 @@
pictureBoxAntiAircraftGun.TabIndex = 0;
pictureBoxAntiAircraftGun.TabStop = false;
//
- // buttonCreate
- //
- buttonCreate.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
- buttonCreate.Location = new Point(12, 406);
- buttonCreate.Name = "buttonCreate";
- buttonCreate.Size = new Size(95, 32);
- buttonCreate.TabIndex = 1;
- buttonCreate.Text = "Создать";
- buttonCreate.UseVisualStyleBackColor = true;
- buttonCreate.Click += ButtonCreate_Click;
- //
// buttonLeft
//
buttonLeft.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
@@ -105,11 +95,34 @@
buttonUp.UseVisualStyleBackColor = true;
buttonUp.Click += ButtonMove_Click;
//
+ // buttonCreate
+ //
+ buttonCreate.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
+ buttonCreate.Location = new Point(12, 406);
+ buttonCreate.Name = "buttonCreate";
+ buttonCreate.Size = new Size(215, 32);
+ buttonCreate.TabIndex = 1;
+ buttonCreate.Text = "Создать зенитную установку";
+ buttonCreate.UseVisualStyleBackColor = true;
+ buttonCreate.Click += ButtonCreate_Click;
+ //
+ // buttonCreatAircraftGun
+ //
+ buttonCreatAircraftGun.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
+ buttonCreatAircraftGun.Location = new Point(233, 406);
+ buttonCreatAircraftGun.Name = "buttonCreatAircraftGun";
+ buttonCreatAircraftGun.Size = new Size(215, 32);
+ buttonCreatAircraftGun.TabIndex = 6;
+ buttonCreatAircraftGun.Text = "Создать установку";
+ buttonCreatAircraftGun.UseVisualStyleBackColor = true;
+ buttonCreatAircraftGun.Click += buttonCreatAircraftGun_Click;
+ //
// FormAntiAircraftGun
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(800, 450);
+ Controls.Add(buttonCreatAircraftGun);
Controls.Add(buttonUp);
Controls.Add(buttonRight);
Controls.Add(buttonDown);
@@ -125,10 +138,11 @@
#endregion
private PictureBox pictureBoxAntiAircraftGun;
- private Button buttonCreate;
private Button buttonLeft;
private Button buttonDown;
private Button buttonRight;
private Button buttonUp;
+ private Button buttonCreate;
+ private Button buttonCreatAircraftGun;
}
}
\ No newline at end of file
diff --git a/AntiAircraftGun/FormAntiAircraftGun.cs b/AntiAircraftGun/FormAntiAircraftGun.cs
index cca877f..098651d 100644
--- a/AntiAircraftGun/FormAntiAircraftGun.cs
+++ b/AntiAircraftGun/FormAntiAircraftGun.cs
@@ -1,11 +1,13 @@
-namespace AntiAircraftGun
+using AntiAircraftGun.Drawnings;
+
+namespace AntiAircraftGun
{
public partial class FormAntiAircraftGun : Form
{
///
/// Поле объект для прорисовки объекта
///
- private DrawningAntiAircraftGun? _drawningAntiAircraftGun;
+ private DrawningAircraftGun? _drawningAircraftGun;
///
/// конструктор формы
///
@@ -18,32 +20,51 @@
///
private void Draw()
{
- if (_drawningAntiAircraftGun == null)
+ if (_drawningAircraftGun == null)
{
return;
}
Bitmap bmp = new(pictureBoxAntiAircraftGun.Width, pictureBoxAntiAircraftGun.Height);
Graphics gr = Graphics.FromImage(bmp);
- _drawningAntiAircraftGun.DrawTransport(gr);
+ _drawningAircraftGun.DrawTransport(gr);
pictureBoxAntiAircraftGun.Image = bmp;
}
+ private void CreateObject(string type)
+ {
+ Random random = new();
+ switch (type)
+ {
+ case nameof(DrawningAircraftGun):
+ _drawningAircraftGun = new DrawningAircraftGun(random.Next(100, 300), random.Next(1000, 3000),
+ Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)));
+ break;
+ case nameof(DrawningAntiAircraftGun):
+ _drawningAircraftGun = new DrawningAntiAircraftGun(random.Next(100, 300), random.Next(1000, 3000),
+ Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)),
+ Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)),
+ Convert.ToBoolean(random.Next(0, 2)), Convert.ToBoolean(random.Next(0, 2)), Convert.ToBoolean(random.Next(0, 2)));
+ break;
+ default:
+ return;
+ }
+
+ _drawningAircraftGun.SetPictureSize(pictureBoxAntiAircraftGun.Width, pictureBoxAntiAircraftGun.Height);
+ _drawningAircraftGun.SetPosition(random.Next(10, 100), random.Next(10, 100));
+ Draw();
+ }
///
- /// Обработка кнопик Создать
+ /// Обработка кнопик Создать Зенитную установку
///
///
///
- private void ButtonCreate_Click(object sender, EventArgs e)
- {
- Random random = new();
- _drawningAntiAircraftGun = new DrawningAntiAircraftGun();
- _drawningAntiAircraftGun.Init(random.Next(100, 300), random.Next(1000, 3000), Color.FromArgb(random.Next(0, 255),
- random.Next(0, 255), random.Next(0, 255)), Color.FromArgb(random.Next(0, 255), random.Next(0, 255), random.Next(0, 255)),
- Convert.ToBoolean(random.Next(0, 2)), Convert.ToBoolean(random.Next(0, 2)), Convert.ToBoolean(random.Next(0, 2)));
- _drawningAntiAircraftGun.SetPictureSize(pictureBoxAntiAircraftGun.Width, pictureBoxAntiAircraftGun.Height);
- _drawningAntiAircraftGun.SetPosition(random.Next(10, 100), random.Next(10, 100));
-
- Draw();
- }
+ private void ButtonCreate_Click(object sender, EventArgs e) => CreateObject(nameof(DrawningAntiAircraftGun));
+ ///
+ /// Обработка кнопик Создать установку
+ ///
+ ///
+ ///
+ private void buttonCreatAircraftGun_Click(object sender, EventArgs e) => CreateObject(nameof(DrawningAircraftGun));
+
///
/// Перемещение объекта по форме
///
@@ -51,7 +72,7 @@
///
private void ButtonMove_Click(object sender, EventArgs e)
{
- if (_drawningAntiAircraftGun == null)
+ if (_drawningAircraftGun == null)
{
return;
}
@@ -60,16 +81,16 @@
switch (name)
{
case "buttonUp":
- result = _drawningAntiAircraftGun.MoveTransport(DirectionType.Up);
+ result = _drawningAircraftGun.MoveTransport(DirectionType.Up);
break;
case "buttonDown":
- result = _drawningAntiAircraftGun.MoveTransport(DirectionType.Down);
+ result = _drawningAircraftGun.MoveTransport(DirectionType.Down);
break;
case "buttonRight":
- result = _drawningAntiAircraftGun.MoveTransport(DirectionType.Right);
+ result = _drawningAircraftGun.MoveTransport(DirectionType.Right);
break;
case "buttonLeft":
- result = _drawningAntiAircraftGun.MoveTransport(DirectionType.Left);
+ result = _drawningAircraftGun.MoveTransport(DirectionType.Left);
break;
}
if (result)
@@ -77,5 +98,7 @@
Draw();
}
}
+
+
}
}
\ No newline at end of file