Compare commits
No commits in common. "70b6a0b7271beabc8d123cd10e2355d9acb7f447" and "155f7c3297bc8ff2e9e85cce1554dc3155ce2f93" have entirely different histories.
70b6a0b727
...
155f7c3297
@ -76,7 +76,7 @@ public abstract class AbstractCompany
|
|||||||
public DrawningTrackedVehicle? GetRandomObject()
|
public DrawningTrackedVehicle? GetRandomObject()
|
||||||
{
|
{
|
||||||
Random rnd = new();
|
Random rnd = new();
|
||||||
return arr?.Get(rnd.Next(GetMaxCount));
|
return _collection?.Get(rnd.Next(GetMaxCount));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -85,19 +85,15 @@ public abstract class AbstractCompany
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public Bitmap? Show()
|
public Bitmap? Show()
|
||||||
{
|
{
|
||||||
Bitmap bitmap = new(pictureWidth, pictureHeight);
|
Bitmap bitmap = new(_pictureWidth, _pictureHeight);
|
||||||
Graphics graphics = Graphics.FromImage(bitmap);
|
Graphics graphics = Graphics.FromImage(bitmap);
|
||||||
DrawBackgound(graphics);
|
DrawBackgound(graphics);
|
||||||
SetObjectsPosition();
|
SetObjectsPosition();
|
||||||
for (int i = 0; i < (arr?.Count ?? 0); ++i)
|
for (int i = 0; i < (_collection?.Count ?? 0); ++i)
|
||||||
{
|
{
|
||||||
try
|
DrawningTrackedVehicle? obj = _collection?.Get(i);
|
||||||
{
|
|
||||||
DrawningTrackedVehicle? obj = arr?.Get(i);
|
|
||||||
obj?.DrawTransport(graphics);
|
obj?.DrawTransport(graphics);
|
||||||
}
|
}
|
||||||
catch (Exception) { }
|
|
||||||
}
|
|
||||||
return bitmap;
|
return bitmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user