Polevoy S.V Lab_work3 #3

Merged
eegov merged 11 commits from LabWork03 into LabWork02 2022-10-07 09:57:40 +04:00
Showing only changes of commit f803dc89dd - Show all commits

View File

@ -111,10 +111,17 @@ namespace Artilleries
private void DrawArtilleries(Graphics g)
{
int width = _pictureWidth / _placeSizeWidth;
int height = _pictureHeight / _placeSizeHeight;
for (int i = 0; i < _setArtilleries.Count; i++)
{
// TODO установка позиции
_setArtilleries.Get(i)?.DrawingObject(g);
var artillery = _setArtilleries.Get(i);
if (artillery != null)
{
artillery.SetObject(i % width * _placeSizeWidth + 10, (height - 1 - i / width) * _placeSizeHeight + 10, _pictureWidth, _pictureHeight);
artillery.DrawingObject(g);
}
}
}
}