Изменение интерфейса IDrawningObject и его реализации DrawningObjectLocomotive

This commit is contained in:
Данила Мочалов 2022-11-04 18:37:11 +04:00
parent 032bf5d2a2
commit 6f35bd337b
2 changed files with 5 additions and 1 deletions

View File

@ -26,7 +26,6 @@ namespace Locomotive
{
return _locomotive?.GetCurrentPosition() ?? default;
}
public void MoveObject(Direction direction)
{
_locomotive?.MoveTransport(direction);
@ -37,5 +36,8 @@ namespace Locomotive
_locomotive?.SetPosition(x, y, width, height);
}
public string getInfo() => _locomotive?.getDataForSave();
public static IDrawningObject Create(string data) => new DrawningObjectLocomotive(data.createDrawningLocomotive());
}
}

View File

@ -19,5 +19,7 @@ namespace Locomotive
/// Получение текущей позиции объекта
(float Left, float Right, float Top, float Bottom) GetCurrentPosition();
// Получение информации по объекту
string getInfo();
}
}