PIbd-22_Isaeva_A.I._Airbus_.../Airbus/MovementStrategy/ObjectParameters.cs
2023-11-18 10:00:43 +04:00

28 lines
770 B
C#

namespace ProjectAirbus.MovementStrategy
{
internal class ObjectParameters
{
private readonly int _x;
private readonly int _y;
private readonly int _width;
private readonly int _height;
// границы
public int LeftBorder => _x;
public int TopBorder => _y;
public int RightBorder => _x + _width;
public int DownBorder => _y + _height;
// середина
public int ObjectMiddleHorizontal => _x + _width / 2;
public int ObjectMiddleVertical => _y + _height / 2;
public ObjectParameters(int x, int y, int width, int height)
{
_x = x;
_y = y;
_width = width;
_height = height;
}
}
}