25 lines
843 B
Java
25 lines
843 B
Java
public class DrawingObjectTanker implements IMoveableObject {
|
|
private final DrawTanker _drawTanker;
|
|
|
|
public DrawingObjectTanker(DrawTanker drawTanker) {
|
|
_drawTanker = drawTanker;
|
|
}
|
|
|
|
public ObjectParameters GetObjectParameters() {
|
|
if (_drawTanker == null || _drawTanker.GetGasolineTanker() == null) {
|
|
return null;
|
|
}
|
|
return new ObjectParameters(_drawTanker.GetPosX(), _drawTanker.GetPosY(), _drawTanker.GetWidth(), _drawTanker.GetHeight());
|
|
}
|
|
|
|
public int GetStep() {
|
|
int s = (int) _drawTanker.GasolineTanker.Step;
|
|
if (s != 0)
|
|
return s;
|
|
return 0;
|
|
}
|
|
|
|
public boolean CheckCanMove(Direction direction) {return !_drawTanker.CanMove(direction); }
|
|
public void MoveObject(Direction direction) { _drawTanker.MoveTransport(direction); }
|
|
|
|
} |