PIbd-21_Potapov_N.S._Stormt.../ProjectStormtrooper/ObjectParameters.java

40 lines
713 B
Java
Raw Normal View History

package ProjectStormtrooper;
public class ObjectParameters {
private int _x;
private int _y;
private int _width;
private int _height;
public int LeftBorder() {
return _x;
}
public int TopBorder() {
return _y;
}
public int RightBorder() {
return _x + _width;
}
public int DownBorder() {
return _y + _height;
}
public int ObjectMiddleHorizontal() {
return _x + _width / 2;
}
public int ObjectMiddleVertical() {
return _y + _height / 2;
}
public ObjectParameters(int x, int y, int width, int height) {
_x = x;
_y = y;
_width = width;
_height = height;
}
}