38 lines
950 B
Java
38 lines
950 B
Java
import java.awt.*;
|
|
|
|
public class DrawningObjectBomber implements IDrawningObject
|
|
{
|
|
private DrawningBomber _airBomber = null;
|
|
|
|
public DrawningObjectBomber(DrawningBomber airBomber)
|
|
{
|
|
_airBomber = airBomber;
|
|
}
|
|
|
|
@Override
|
|
public float getStep() {
|
|
if (_airBomber == null || _airBomber.AirBomber == null) return 0;
|
|
return _airBomber.AirBomber.GetStep();
|
|
}
|
|
|
|
@Override
|
|
public void SetObject(int x, int y, int width, int height) {
|
|
_airBomber.SetPosition(x, y, width, height);
|
|
}
|
|
|
|
@Override
|
|
public void MoveObject(Direction direction) {
|
|
_airBomber.MoveTransport(direction);
|
|
}
|
|
|
|
@Override
|
|
public void DrawningObject(Graphics g) {
|
|
_airBomber.DrawTransport(g);
|
|
}
|
|
|
|
@Override
|
|
public float[] GetCurrentPosition() {
|
|
if (_airBomber == null || _airBomber.AirBomber == null) return null;
|
|
return _airBomber.GetCurrentPosition();
|
|
}
|
|
} |