финальные изменения
This commit is contained in:
parent
d740eda7c3
commit
fa6ac61b63
@ -88,7 +88,7 @@ namespace Stormtrooper
|
||||
/// <returns></returns>
|
||||
public Bitmap ShowOnMap()
|
||||
{
|
||||
foreach (var air in _setAirs.GetBoats())
|
||||
foreach (var air in _setAirs.GetAirs())
|
||||
{
|
||||
return _map.CreateMap(_pictureWidth, _pictureHeight, air);
|
||||
}
|
||||
@ -168,15 +168,22 @@ namespace Stormtrooper
|
||||
int currentHeight = 0;
|
||||
|
||||
int i = 0;
|
||||
foreach (var air in _setAirs.GetBoats())
|
||||
foreach (var air in _setAirs.GetAirs())
|
||||
{
|
||||
|
||||
air.SetObject(currentWidth * _placeSizeWidth,
|
||||
air?.SetObject(currentWidth * _placeSizeWidth,
|
||||
currentHeight * _placeSizeHeight,
|
||||
_pictureWidth, _pictureHeight);
|
||||
air.DrawningObject(g);
|
||||
air?.DrawningObject(g);
|
||||
|
||||
i++;
|
||||
if (currentWidth > 0)
|
||||
currentWidth--;
|
||||
else
|
||||
{
|
||||
currentWidth = width - 1;
|
||||
currentHeight++;
|
||||
}
|
||||
if (currentHeight > height) return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -90,13 +90,13 @@ namespace Stormtrooper
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<T> GetBoats()
|
||||
public IEnumerable<T> GetAirs()
|
||||
{
|
||||
foreach (var boat in _places)
|
||||
foreach (var air in _places)
|
||||
{
|
||||
if (boat != null)
|
||||
if (air != null)
|
||||
{
|
||||
yield return boat;
|
||||
yield return air;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user