Mochalov D.V. Hard LabWork06 #6

Closed
b0n3l3sS wants to merge 8 commits from LabWork06 into LabWork05
3 changed files with 9 additions and 1 deletions
Showing only changes of commit 0ca1f9efcb - Show all commits

View File

@ -180,7 +180,7 @@ public class DrawningLocomotive {
if (strs[5] == "Simple") drawningExtra = new ExtraWheelsDraw(Integer.parseInt(strs[6]), Locomotive.getBodyColor());
if (strs[5] == "Star") drawningExtra = new ExtraStarWheelDraw(Integer.parseInt(strs[6]), Locomotive.getBodyColor());
if (strs[5] == "Round") drawningExtra = new ExtraRoundWheelDraw(Integer.parseInt(strs[6]), Locomotive.getBodyColor());
if (drawningExtra == null)
if (drawningExtra == null) return null;
if (strs.length == 7)
{
Locomotive = new EntityLocomotive(

View File

@ -39,4 +39,9 @@ public class DrawningObjectLocomotive implements IDrawningObject {
{
if (_locomotive != null) _locomotive.SetPosition(x, y, width, height);
}
public String getInfo(){
if (_locomotive == null) return null;
return _locomotive.getDataForSave();
}
}

View File

@ -8,6 +8,9 @@ public interface IDrawningObject {
void MoveObject(Direction direction);
/// Отрисовка объекта
void DrawningObject(Graphics g);
String getInfo();
/// Получение текущей позиции объекта
float[] GetCurrentPosition();
//0 - up