PIbd-22_Shabunov_O.A._AirBo.../AirBomber/MovementStrategy/ObjectParameters.cs

28 lines
714 B
C#
Raw Normal View History

namespace AirBomber.MovementStrategy
{
public 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 BottomBorder => _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;
}
}
}