30 lines
933 B
Java
30 lines
933 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);
|
||
|
}
|
||
|
}
|