Спаун самолетов налево и вниз
This commit is contained in:
parent
70641cea7f
commit
958cddcd6a
@ -160,10 +160,13 @@ namespace AirBomber
|
|||||||
/// <param name="g"></param>
|
/// <param name="g"></param>
|
||||||
private void DrawAirplanes(Graphics g)
|
private void DrawAirplanes(Graphics g)
|
||||||
{
|
{
|
||||||
|
int countInLine = _pictureWidth / _placeSizeWidth;
|
||||||
|
int maxLeft = (countInLine - 1) * _placeSizeWidth;
|
||||||
for (int i = 0; i < _setAirplanes.Count; i++)
|
for (int i = 0; i < _setAirplanes.Count; i++)
|
||||||
{
|
{
|
||||||
// TODO установка позиции
|
var airplane = _setAirplanes.Get(i);
|
||||||
_setAirplanes.Get(i)?.DrawningObject(g);
|
airplane?.SetObject(maxLeft - i % countInLine * _placeSizeWidth, i / countInLine * _placeSizeHeight, _pictureWidth, _pictureHeight);
|
||||||
|
airplane?.DrawningObject(g);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user