PIbd-22_Turner_I.A._AntiAir.../AntiAircraftGun/AntiAircraftGun/DrawingObjectAntiAircraftGun.cs
2022-09-18 14:39:26 +04:00

36 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AntiAircraftGun
{
internal class DrawingObjectAntiAircraftGun : IDrawingObject
{
private DrawingAntiAircraftGun _antiAircraftGun = null;
public DrawingObjectAntiAircraftGun(DrawingAntiAircraftGun antiAircraftGun)
{
_antiAircraftGun = antiAircraftGun;
}
public float Step => _antiAircraftGun?.AntiAircraftGun?.Step ?? 0;
public (float Left, float Right, float Top, float Bottom) GetCurrentPosition()
{
return _antiAircraftGun?.GetCurrentPosition() ?? default;
}
public void MoveObject(Direction direction)
{
_antiAircraftGun?.MoveTransport(direction);
}
public void SetObject(int x, int y, int width, int height)
{
_antiAircraftGun.SetPosition(x, y, width, height);
}
void IDrawingObject.DrawingObjectAntiAircraftGun(Graphics g)
{
_antiAircraftGun?.DrawTransport(g);
}
}
}