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