using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AirFighter { internal class DrawingObjectAircraft : IDrawingObject { private DrawingAircraft _aircraft = null; public DrawingObjectAircraft(DrawingAircraft aircraft) { _aircraft = aircraft; } public float Step => _aircraft.Plane?.Step ?? 0; public (float Left, float Top, float Right, float Bottom) GetCurrentPosition() { return _aircraft?.GetCurrentPosition() ?? default; } public void MoveObject(Direction direction) { _aircraft.MoveTransport(direction); } public void SetObject(int x, int y, int width, int height) { _aircraft.SetPosition(x, y, width, height); } void IDrawingObject.DrawingObject(Graphics g) { _aircraft.DrawTransport(g); } public void DoSomething() { Random rnd = new Random(); int x = rnd.Next(0, 10); } } }