Отрисовка объектов в направлении влево и вверх
This commit is contained in:
parent
b4ac8a93fa
commit
11d7ebed5b
@ -39,7 +39,7 @@ public class AirbusAerodromeService : AbstractCompany
|
||||
|
||||
protected override void SetObjectPosition()
|
||||
{
|
||||
int countOfHorizontal = _pictureWidth / (_placeSizeWidth + _placeSizeWidth / 2);
|
||||
int countOfHorizontal = _pictureWidth / (_placeSizeWidth + _placeSizeWidth / 2) + 1;
|
||||
int countOfVertical = _pictureHeight / _placeSizeHeight;
|
||||
|
||||
for (int i = 0; i < _collection.Count; i++)
|
||||
@ -47,8 +47,8 @@ public class AirbusAerodromeService : AbstractCompany
|
||||
if (_collection.Get(i) != null)
|
||||
{
|
||||
_collection.Get(i)?.SetPictureSize(_pictureWidth, _pictureHeight);
|
||||
_collection.Get(i)?.SetPosition((_placeSizeWidth + _placeSizeWidth / 2) * (countOfHorizontal - i / countOfVertical) + 5,
|
||||
_placeSizeHeight * (countOfVertical - i % countOfVertical - 1) + 5);
|
||||
_collection.Get(i)?.SetPosition((_placeSizeWidth + _placeSizeWidth / 2) * (countOfHorizontal - i % countOfHorizontal - 1) + 5,
|
||||
_placeSizeHeight * (countOfVertical - i / countOfHorizontal - 1) + 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user