35 lines
929 B
C#
35 lines
929 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AircraftCarrier
|
|
{
|
|
internal class DrawingObjectWarship : IDrawingObject
|
|
{
|
|
private DrawingWarship _ship = null;
|
|
public DrawingObjectWarship(DrawingWarship ship)
|
|
{
|
|
_ship = ship;
|
|
}
|
|
public float Step => _ship?.Ship?.Step ?? 0;
|
|
public (float Left, float Right, float Top, float Bottom) GetCurrentPosition()
|
|
{
|
|
return _ship?.GetCurrentPosition() ?? default;
|
|
}
|
|
public void MoveObject(Direction direction)
|
|
{
|
|
_ship?.MoveTransport(direction);
|
|
}
|
|
public void SetObject(int x, int y, int width, int height)
|
|
{
|
|
_ship.SetPosition(x, y, width, height);
|
|
}
|
|
public void DrawningObject(Graphics g)
|
|
{
|
|
// TODO
|
|
}
|
|
}
|
|
}
|