Изменил(а) на 'DoubleDeckerBus/DoubleDeckerBus/DrawningBus.cs'

This commit is contained in:
klllst 2022-09-20 12:43:50 +04:00
parent ab74c252c3
commit 12c4d1cbf8

View File

@ -59,7 +59,7 @@ namespace DoubleDeckerBus
/// <param name="height">Высота картинки</param>
public void SetPosition(int x, int y, int width, int height)
{
if (x > 0 && y > 0 && width > 0 && height > 0 && x < width && y < height)
if (x > 0 && y > 0 && width > 0 && height > 0 && x + _busWidth < width && y + _busHeight < height)
{
_startPosX = x;
_startPosY = y;