Pibd-14_Aliulov_S.R. LabWork03 Simple #6

Closed
SAliulovq wants to merge 5 commits from LabWork03 into LabWork02
4 changed files with 4 additions and 13 deletions
Showing only changes of commit e982b77a38 - Show all commits

View File

@ -5,6 +5,7 @@ namespace ProjectAirBomber.Drawnings;
/// <summary>
/// Класс, отвечающий за прорисовку и перемещение объекта-сущности
/// </summary>
///
public class DrawningAirBomber : DrawningBomber
{
@ -19,16 +20,12 @@ public class DrawningAirBomber : DrawningBomber
/// <param name="bombs">Признак наличия бомб</param>
//TO DO!
//TO DO!!!
public DrawningAirBomber(int speed, double weight, Color bodyColor, Color additionalColor, bool fuelTanks, bool bombs) : base(200, 160)
{
EntityBomber = new EntityAirBomber(speed, weight, bodyColor, additionalColor, fuelTanks, bombs);
}
public override void DrawTransport(Graphics g)
{
if (EntityBomber == null || EntityBomber is not EntityAirBomber airBomber || !_startPosX.HasValue || !_startPosY.HasValue)
@ -63,13 +60,10 @@ public class DrawningAirBomber : DrawningBomber
new Point(_startPosX.Value + 80, _startPosY.Value + 100)
});
}
_startPosX += 10;
_startPosY += 5;
base.DrawTransport(g);
_startPosX -= 10;
_startPosY -= 5;
}
}

View File

@ -17,7 +17,6 @@ public partial class FormAirBomber : Form
/// </summary>
private AbstractStrategy? _strategy;
/// <summary>
/// Получение объекта
/// </summary>

View File

@ -1,5 +1,4 @@
using ProjectAirBomber.MovementStrategy;
namespace ProjectAirBomber.MovementStrategy;
/// <summary>
@ -20,6 +19,7 @@ public class MoveToBorder : AbstractStrategy
&& objParams.ObjectMiddleVertical + GetStep() >= FieldHeight;
}
protected override void MoveToTarget()
{
ObjectParameters? objParams = GetObjectParameters;

View File

@ -1,7 +1,7 @@
using ProjectAirBomber.Drawnings;
namespace ProjectAirBomber.MovementStrategy;
public class MoveableBomber : IMoveableObject
{
/// <summary>
@ -55,6 +55,4 @@ public class MoveableBomber : IMoveableObject
_ => DirectionType.Unknow,
};
}
}