41 lines
919 B
C#
41 lines
919 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AirPlaneWithRadar
|
|
{
|
|
internal class DrawingObject : IDrawingObject
|
|
{
|
|
private DrawingPlain _plain;
|
|
|
|
public DrawingObject(DrawingPlain plain)
|
|
{
|
|
_plain = plain;
|
|
}
|
|
public float Step => _plain?.Plain?.Step ?? 0;
|
|
|
|
|
|
public void DrawningObject(Graphics g)
|
|
{
|
|
//TODO
|
|
}
|
|
|
|
public (float Left, float Right, float Top, float Bottom) GetCurrentPosition()
|
|
{
|
|
return _plain?.GetCurrentPosition() ?? default;
|
|
}
|
|
|
|
public void MoveObject(Direction direction)
|
|
{
|
|
_plain?.MoveTransport(direction);
|
|
}
|
|
|
|
public void SetObject(int x, int y, int width, int height)
|
|
{
|
|
_plain.setPosition(x, y, width, height);
|
|
}
|
|
}
|
|
}
|