This commit is contained in:
ValAnn 2023-10-15 20:06:58 +04:00
parent ada566ea90
commit 9689bd79b0
4 changed files with 6 additions and 8 deletions

View File

@ -27,16 +27,14 @@ namespace DumpTruck
public bool Init(int speed, double weight, Color bodyColor, Color additionalColor, bool bodyKit, bool tent, int width, int height)
{
if (width <= _carWidth || height <= _carHeight)
return false;
_pictureWidth = width;
_pictureHeight = height;
if (_pictureWidth > _carWidth && _pictureHeight > _carHeight)
{
EntityDumpTruck = new DumpTruck();
EntityDumpTruck.Init(speed, weight, bodyColor, additionalColor, bodyKit, tent);
return true;
}
return false;
EntityDumpTruck = new DumpTruck();
EntityDumpTruck.Init(speed, weight, bodyColor, additionalColor, bodyKit, tent);
return true;
}
public void SetPosition(int x, int y)