2023-10-18 12:33:39 +04:00
|
|
|
public class DrawingObjectTanker implements IMoveableObject {
|
2023-11-04 14:33:13 +04:00
|
|
|
private final DrawTanker _drawTanker;
|
2023-10-18 12:33:39 +04:00
|
|
|
|
2023-11-04 14:33:13 +04:00
|
|
|
public DrawingObjectTanker(DrawTanker drawTanker) {
|
2023-10-18 12:33:39 +04:00
|
|
|
_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); }
|
|
|
|
|
|
|
|
}
|