исправление порядка добавления

This commit is contained in:
bekodeg 2023-10-25 09:06:28 +04:00
parent d2e990ba5a
commit 7880fc1215

View File

@ -138,8 +138,9 @@ namespace ProjectElectricLocomotive.Generics
continue;
}
int widthCount = _pictureHeight / _placeSizeHeight;
drawningLocomotive.SetPosition((i / widthCount) * _placeSizeWidth, (i % widthCount) * _placeSizeHeight);
int ColumnCount = _pictureWidth / _placeSizeWidth;
int RowsCount = _pictureHeight / _placeSizeHeight;
drawningLocomotive.SetPosition((i % ColumnCount) * _placeSizeWidth, ((RowsCount - i / ColumnCount - 1) * _placeSizeHeight));
drawningLocomotive.DrawTransport(g);
}
}