fix
This commit is contained in:
parent
ada566ea90
commit
9689bd79b0
@ -27,17 +27,15 @@ namespace DumpTruck
|
|||||||
|
|
||||||
public bool Init(int speed, double weight, Color bodyColor, Color additionalColor, bool bodyKit, bool tent, int width, int height)
|
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;
|
_pictureWidth = width;
|
||||||
_pictureHeight = height;
|
_pictureHeight = height;
|
||||||
if (_pictureWidth > _carWidth && _pictureHeight > _carHeight)
|
|
||||||
{
|
|
||||||
|
|
||||||
EntityDumpTruck = new DumpTruck();
|
EntityDumpTruck = new DumpTruck();
|
||||||
EntityDumpTruck.Init(speed, weight, bodyColor, additionalColor, bodyKit, tent);
|
EntityDumpTruck.Init(speed, weight, bodyColor, additionalColor, bodyKit, tent);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetPosition(int x, int y)
|
public void SetPosition(int x, int y)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user