2024-10-03 01:16:11 +04:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
2024-10-03 01:40:53 +04:00
|
|
|
|
namespace ProjectGasolineTanker.MovementStratg
|
2024-10-03 01:16:11 +04:00
|
|
|
|
{
|
|
|
|
|
public class ObjectParameters
|
|
|
|
|
{
|
|
|
|
|
private readonly int _x;
|
|
|
|
|
private readonly int _y;
|
|
|
|
|
private readonly int _width;
|
|
|
|
|
private readonly int _height;
|
2024-10-03 01:40:53 +04:00
|
|
|
|
|
2024-10-03 01:16:11 +04:00
|
|
|
|
public int LeftBorder => _x;
|
2024-10-03 01:40:53 +04:00
|
|
|
|
|
2024-10-03 01:16:11 +04:00
|
|
|
|
public int TopBorder => _y;
|
2024-10-03 01:40:53 +04:00
|
|
|
|
|
2024-10-03 01:16:11 +04:00
|
|
|
|
public int RightBorder => _x + _width;
|
2024-10-03 01:40:53 +04:00
|
|
|
|
|
2024-10-03 01:16:11 +04:00
|
|
|
|
public int DownBorder => _y + _height;
|
2024-10-03 01:40:53 +04:00
|
|
|
|
|
2024-10-03 01:16:11 +04:00
|
|
|
|
public int ObjectMiddleHorizontal => _x + _width / 2;
|
2024-10-03 01:40:53 +04:00
|
|
|
|
|
2024-10-03 01:16:11 +04:00
|
|
|
|
public int ObjectMiddleVertical => _y + _height / 2;
|
2024-10-03 01:40:53 +04:00
|
|
|
|
|
2024-10-03 01:16:11 +04:00
|
|
|
|
public ObjectParameters(int x, int y, int width, int height)
|
|
|
|
|
{
|
|
|
|
|
_x = x;
|
|
|
|
|
_y = y;
|
|
|
|
|
_width = width;
|
|
|
|
|
_height = height;
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-10-03 01:40:53 +04:00
|
|
|
|
}
|