2022-11-10 16:44:45 +04:00
|
|
|
import java.awt.*;
|
|
|
|
|
|
|
|
public class DrawingObjectAircraft implements IDrawingObject
|
|
|
|
{
|
|
|
|
private DrawingAircraft _aircraft = null;
|
|
|
|
public DrawingObjectAircraft(DrawingAircraft aircraft){
|
|
|
|
_aircraft = aircraft;
|
|
|
|
}
|
|
|
|
|
2022-11-25 13:49:46 +04:00
|
|
|
public DrawingAircraft getAircraft() {
|
|
|
|
return _aircraft;
|
|
|
|
}
|
|
|
|
|
2022-11-10 16:44:45 +04:00
|
|
|
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();
|
|
|
|
}
|
|
|
|
}
|