39 lines
853 B
Java
39 lines
853 B
Java
|
import java.awt.*;
|
||
|
|
||
|
public class DrawningObjectPlane implements IDrawningObject {
|
||
|
private DrawningPlane _plane = null;
|
||
|
|
||
|
public DrawningObjectPlane(DrawningPlane plane)
|
||
|
{
|
||
|
_plane = plane;
|
||
|
}
|
||
|
|
||
|
public float Step() {
|
||
|
if(_plane != null && _plane.Plane != null)
|
||
|
return _plane.Plane.Step;
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void SetObject(int x, int y, int width, int height) {
|
||
|
_plane.SetPosition(x,y,width,height);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void MoveObject(Direction direction) {
|
||
|
_plane.MoveTransport(direction);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void DrawingObject(Graphics g) {
|
||
|
_plane.DrawTransport(g);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public float[] GetCurrentPosition() {
|
||
|
if(_plane!=null)
|
||
|
return _plane.GetCurrentPosition();
|
||
|
return null;
|
||
|
}
|
||
|
}
|