32 lines
898 B
Java
32 lines
898 B
Java
import java.awt.*;
|
|
|
|
public class DrawingObjectAirbus implements IDrawingObject {
|
|
|
|
private DrawingAirbus _airbus = null;
|
|
|
|
public DrawingObjectAirbus(DrawingAirbus airbus)
|
|
{
|
|
_airbus = airbus;
|
|
}
|
|
public float getStep() {
|
|
if (_airbus.Airbus != null) {
|
|
return _airbus.Airbus.Step();
|
|
}
|
|
return 0;
|
|
}
|
|
public void SetObject(int x, int y, int width, int height) {
|
|
if (_airbus != null) _airbus.SetPosition(x, y, width, height);
|
|
}
|
|
public void MoveObject(Direction direction) {
|
|
if (_airbus != null) _airbus.MoveTransport(direction);
|
|
}
|
|
public void DrawingObject(Graphics g) {
|
|
if (_airbus != null) _airbus.DrawTransport((Graphics2D) g);
|
|
}
|
|
public float[] GetCurrentPosition() {
|
|
if (_airbus != null) {
|
|
return _airbus.GetCurrentPosition();
|
|
}
|
|
return null;
|
|
}
|
|
} |