Bug fix
This commit is contained in:
parent
a74f2c8dd3
commit
bd0f0a28c3
@ -39,7 +39,7 @@ namespace AccordionBus
|
||||
/// <summary>
|
||||
/// Ширина прорисовки автобуса
|
||||
/// </summary>
|
||||
private readonly int _busWidth = 200;
|
||||
private int _busWidth = 100;
|
||||
|
||||
/// <summary>
|
||||
/// Высота прорисовки автобуса
|
||||
@ -61,6 +61,10 @@ namespace AccordionBus
|
||||
_pictureWidth = width;
|
||||
_pictureHeight = height;
|
||||
EntityAccordionBus = new EntityAccordionBus();
|
||||
if (additionalBody)
|
||||
{
|
||||
_busWidth = 215;
|
||||
}
|
||||
EntityAccordionBus.Init(speed, weight,
|
||||
bodyColor, additionalColor,
|
||||
additionalBody, additionalDoor);
|
||||
@ -119,13 +123,13 @@ namespace AccordionBus
|
||||
}
|
||||
break;
|
||||
case DirectionType.Right:
|
||||
if (_startPosX + EntityAccordionBus.Step < _pictureWidth)
|
||||
if (_startPosX + EntityAccordionBus.Step < _pictureWidth - _busWidth)
|
||||
{
|
||||
_startPosX += (int)EntityAccordionBus.Step;
|
||||
}
|
||||
break;
|
||||
case DirectionType.Down:
|
||||
if (_startPosY + EntityAccordionBus.Step < _pictureHeight)
|
||||
if (_startPosY + EntityAccordionBus.Step < _pictureHeight - _busHeight)
|
||||
{
|
||||
_startPosY += (int)EntityAccordionBus.Step;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user