Novopolltsev.A.A. TwoStep #1

Closed
A.Novopoltsev wants to merge 4 commits from TwoStep into FirstStep
Showing only changes of commit 64280d0b6f - Show all commits

View File

@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Warship
{
public class DrawningObjectLinkor : IDrawningObject
{
private DrawningShip _ship;
public DrawningObjectLinkor(DrawningShip ship)
{
_ship = ship;
}
public float Step => _ship.Ship.Step;
public void DrawningObject(Graphics g)
{
_ship.DrawTransport(g);
}
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);
}
}
}