PIbd-22_Aleikin_A.M._AirBom.../DrawningObjectBomber.java

38 lines
950 B
Java
Raw Normal View History

2022-12-13 21:37:45 +04:00
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();
}
}