PIbd-23_Panina_A.D.Cruiser..../DrawingObjectCruiser.java
2023-12-09 00:17:07 +04:00

24 lines
927 B
Java

public class DrawingObjectCruiser implements IMoveableObject {
private DrawingCruiser _drawningCruiser = null;
public DrawingObjectCruiser(DrawingCruiser drawningCruiser) {
_drawningCruiser = drawningCruiser;
}
public ObjectParameters GetObjectPosition() {
if (_drawningCruiser == null || _drawningCruiser.EntityCruiser == null) {
return null;
}
return new ObjectParameters(_drawningCruiser.GetPosX(), _drawningCruiser.GetPosY(), _drawningCruiser.GetWidth(), _drawningCruiser.GetHeight());
}
public int GetStep() {
return (int) (_drawningCruiser.EntityCruiser.Step());
}
public boolean CheckCanMove(Direction direction) {
if (_drawningCruiser.CanMove(direction)){
return true;
}
return false;
}
public void MoveObject(Direction direction) {
_drawningCruiser.MoveTransport(direction);
}
}