35 lines
1.1 KiB
C#
35 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace HoistingCrane
|
|
{
|
|
internal class DrawingObjectHoistingCrane : IDrawingObject
|
|
{
|
|
private DrawingHoistingCrane _hoistingCrane = null;
|
|
public DrawingObjectHoistingCrane(DrawingHoistingCrane hoistingCrane)
|
|
{
|
|
_hoistingCrane = hoistingCrane;
|
|
}
|
|
public float Step => _hoistingCrane?.HoistingCrane?.Step ?? 0;
|
|
public (float Left, float Right, float Top, float Bottom) GetCurrentPosition()
|
|
{
|
|
return _hoistingCrane?.GetCurrentPosition() ?? default;
|
|
}
|
|
public void MoveObject(Direction direction)
|
|
{
|
|
_hoistingCrane?.MoveTransport(direction);
|
|
}
|
|
public void SetObject(int x, int y, int width, int height)
|
|
{
|
|
_hoistingCrane.SetPosition(x, y, width, height);
|
|
}
|
|
public void DrawingObject(Graphics g)
|
|
{
|
|
_hoistingCrane?.DrawTransport(g);
|
|
}
|
|
}
|
|
}
|