diff --git a/Locomotive/Locomotive/DrawningObjectLocomotive.cs b/Locomotive/Locomotive/DrawningObjectLocomotive.cs index 4a518dc..ab86474 100644 --- a/Locomotive/Locomotive/DrawningObjectLocomotive.cs +++ b/Locomotive/Locomotive/DrawningObjectLocomotive.cs @@ -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()); } } diff --git a/Locomotive/Locomotive/IDrawningObject.cs b/Locomotive/Locomotive/IDrawningObject.cs index 5a7c000..37473dd 100644 --- a/Locomotive/Locomotive/IDrawningObject.cs +++ b/Locomotive/Locomotive/IDrawningObject.cs @@ -19,5 +19,7 @@ namespace Locomotive /// Получение текущей позиции объекта (float Left, float Right, float Top, float Bottom) GetCurrentPosition(); + // Получение информации по объекту + string getInfo(); } }