import java.awt.*; public class DrawingObjectAircraft implements IDrawingObject { private DrawingAircraft _aircraft = null; public DrawingObjectAircraft(DrawingAircraft aircraft){ _aircraft = aircraft; } public DrawingAircraft getAircraft() { return _aircraft; } public void MoveObject(Direction direction) { if(_aircraft == null) return; _aircraft.MoveTransport(direction); } @Override public float getStep() { if(_aircraft == null) return 0; return _aircraft.AirFighter.Step; } public void SetObject(int x, int y, int width, int height) { _aircraft.SetPosition(x, y, width, height); } public void DrawningObject(Graphics2D g) { // TODO _aircraft.DrawTransport(g); } @Override public Point GetLeftTop() { if(_aircraft == null) return new Point(0,0); return _aircraft.getLeftTop(); } @Override public Point GetRightBottom() { if(_aircraft == null) return new Point(0,0); return _aircraft.getRightBottom(); } }