PIbd-23_Panina_A.D.Cruiser..../DrawingObjectCruiser.java

30 lines
933 B
Java
Raw Normal View History

2023-12-08 23:20:53 +04:00
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);
}
}