Исправления
This commit is contained in:
parent
eae54734e1
commit
45aa67a6bc
@ -80,7 +80,7 @@ namespace Ship
|
||||
Bitmap bmp = new(_pictureWidth, _pictureHeight);
|
||||
Graphics gr = Graphics.FromImage(bmp);
|
||||
DrawBackground(gr);
|
||||
DrawCars(gr);
|
||||
DrawShips(gr);
|
||||
return bmp;
|
||||
}
|
||||
/// <summary>
|
||||
@ -169,18 +169,18 @@ namespace Ship
|
||||
/// Метод прорисовки объектов
|
||||
/// </summary>
|
||||
/// <param name="g"></param>
|
||||
private void DrawCars(Graphics g)
|
||||
private void DrawShips(Graphics g)
|
||||
{
|
||||
int width = _pictureWidth / _placeSizeWidth;
|
||||
int height = _pictureHeight / _placeSizeHeight;
|
||||
|
||||
for (int i = 0; i < _setShips.Count; i++)
|
||||
{
|
||||
var artillery = _setShips.Get(i);
|
||||
if (artillery != null)
|
||||
var ship = _setShips.Get(i);
|
||||
if (ship != null)
|
||||
{
|
||||
artillery.SetObject((width - i % width - 1) * _placeSizeWidth + 10, (i / width) * _placeSizeHeight + 10, _pictureWidth, _pictureHeight);
|
||||
artillery.DrawningObject(g);
|
||||
ship.SetObject((width - i % width - 1) * _placeSizeWidth + 10, (i / width) * _placeSizeHeight + 10, _pictureWidth, _pictureHeight);
|
||||
ship.DrawningObject(g);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user