36 lines
950 B
C#
36 lines
950 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Airbus
|
|
{
|
|
internal class DrawningObjectPlane : IDrawningObject
|
|
{
|
|
private DrawningPlane _plane = null;
|
|
public DrawningObjectPlane(DrawningPlane plane)
|
|
{
|
|
_plane = plane;
|
|
}
|
|
public float Step => _plane?.Plane?.Step ?? 0;
|
|
public (float Left, float Top, float Right, float Bottom)
|
|
GetCurrentPosition()
|
|
{
|
|
return _plane?.GetCurrentPosition() ?? default;
|
|
}
|
|
public void MoveObject(Direction direction)
|
|
{
|
|
_plane?.MoveTransport(direction);
|
|
}
|
|
public void SetObject(int x, int y, int width, int height)
|
|
{
|
|
_plane.SetPosition(x, y, width, height);
|
|
}
|
|
public void DrawningObject(Graphics g)
|
|
{
|
|
_plane.DrawTransport(g);
|
|
}
|
|
}
|
|
}
|