Agliullov D. A. Lab Work 3 Base #11

Merged
eegov merged 19 commits from Lab3 into Lab2 2022-10-14 10:03:33 +04:00
Showing only changes of commit 958cddcd6a - Show all commits

View File

@ -160,10 +160,13 @@ namespace AirBomber
/// <param name="g"></param>
private void DrawAirplanes(Graphics g)
{
int countInLine = _pictureWidth / _placeSizeWidth;
int maxLeft = (countInLine - 1) * _placeSizeWidth;
for (int i = 0; i < _setAirplanes.Count; i++)
{
// TODO установка позиции
_setAirplanes.Get(i)?.DrawningObject(g);
var airplane = _setAirplanes.Get(i);
airplane?.SetObject(maxLeft - i % countInLine * _placeSizeWidth, i / countInLine * _placeSizeHeight, _pictureWidth, _pictureHeight);
airplane?.DrawningObject(g);
}
}
}