Тест03
This commit is contained in:
parent
f2bfec6818
commit
e982b77a38
@ -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;
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -17,7 +17,6 @@ public partial class FormAirBomber : Form
|
||||
/// </summary>
|
||||
private AbstractStrategy? _strategy;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Получение объекта
|
||||
/// </summary>
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user