47 lines
1.1 KiB
C#
47 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Drawing;
|
|
|
|
namespace Trolleybus
|
|
{
|
|
internal class DrawningObjectTrolleybus : IDrawningObject
|
|
{
|
|
private DrawingTrolleybus _trolleybus = null;
|
|
|
|
public DrawningObjectTrolleybus(DrawingTrolleybus trolleybus)
|
|
{
|
|
_trolleybus = trolleybus;
|
|
}
|
|
|
|
public float Step => _trolleybus?.Trolleybus?.Step ?? 0;
|
|
|
|
public (float Left, float Right, float Top, float Bottom) GetCurrentPosition()
|
|
{
|
|
return _trolleybus?.GetCurrentPosition() ?? default;
|
|
}
|
|
|
|
public void MoveObject(Direction direction)
|
|
{
|
|
_trolleybus?.MoveTransport(direction);
|
|
}
|
|
|
|
public void nothing()
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public void SetObject(int x, int y, int width, int height)
|
|
{
|
|
_trolleybus.SetPosition(x, y, width, height);
|
|
}
|
|
|
|
void IDrawningObject.DrawningObject(Graphics g)
|
|
{
|
|
_trolleybus.DrawTransport(g);
|
|
}
|
|
}
|
|
}
|