33 lines
783 B
Java
33 lines
783 B
Java
|
public class ObjectParameters {
|
||
|
private int _x;
|
||
|
private int _y;
|
||
|
private int _width;
|
||
|
private int _height;
|
||
|
|
||
|
public int LeftBorder;
|
||
|
|
||
|
public int TopBorder;
|
||
|
|
||
|
public int RightBorder;
|
||
|
|
||
|
public int DownBorder;
|
||
|
|
||
|
public int ObjectMiddleHorizontal;
|
||
|
|
||
|
public int ObjectMiddleVertical;
|
||
|
|
||
|
public ObjectParameters(int x, int y, int width, int height)
|
||
|
{
|
||
|
_x = x;
|
||
|
_y = y;
|
||
|
_width = width;
|
||
|
_height = height;
|
||
|
LeftBorder = _x;
|
||
|
TopBorder = _y;
|
||
|
RightBorder = _x + _width;
|
||
|
DownBorder = _y + _height;
|
||
|
ObjectMiddleHorizontal = _x + _width / 2;
|
||
|
ObjectMiddleVertical = _y + _height / 2;
|
||
|
}
|
||
|
}
|