Доделана отрисовка артиллерий
This commit is contained in:
parent
ccd57fad9b
commit
f803dc89dd
@ -111,10 +111,17 @@ namespace Artilleries
|
|||||||
|
|
||||||
private void DrawArtilleries(Graphics g)
|
private void DrawArtilleries(Graphics g)
|
||||||
{
|
{
|
||||||
|
int width = _pictureWidth / _placeSizeWidth;
|
||||||
|
int height = _pictureHeight / _placeSizeHeight;
|
||||||
|
|
||||||
for (int i = 0; i < _setArtilleries.Count; i++)
|
for (int i = 0; i < _setArtilleries.Count; i++)
|
||||||
{
|
{
|
||||||
// TODO установка позиции
|
var artillery = _setArtilleries.Get(i);
|
||||||
_setArtilleries.Get(i)?.DrawingObject(g);
|
if (artillery != null)
|
||||||
|
{
|
||||||
|
artillery.SetObject(i % width * _placeSizeWidth + 10, (height - 1 - i / width) * _placeSizeHeight + 10, _pictureWidth, _pictureHeight);
|
||||||
|
artillery.DrawingObject(g);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user