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()
|
||||
{
|
||||
Random rnd = new();
|
||||
return arr?.Get(rnd.Next(GetMaxCount));
|
||||
return _collection?.Get(rnd.Next(GetMaxCount));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -85,19 +85,15 @@ public abstract class AbstractCompany
|
||||
/// <returns></returns>
|
||||
public Bitmap? Show()
|
||||
{
|
||||
Bitmap bitmap = new(pictureWidth, pictureHeight);
|
||||
Bitmap bitmap = new(_pictureWidth, _pictureHeight);
|
||||
Graphics graphics = Graphics.FromImage(bitmap);
|
||||
DrawBackgound(graphics);
|
||||
SetObjectsPosition();
|
||||
for (int i = 0; i < (arr?.Count ?? 0); ++i)
|
||||
for (int i = 0; i < (_collection?.Count ?? 0); ++i)
|
||||
{
|
||||
try
|
||||
{
|
||||
DrawningTrackedVehicle? obj = arr?.Get(i);
|
||||
DrawningTrackedVehicle? obj = _collection?.Get(i);
|
||||
obj?.DrawTransport(graphics);
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user