hotfix SetPosition()
This commit is contained in:
parent
67e35f5776
commit
cb303b9ca4
@ -72,19 +72,29 @@ public class DrawningWarmlyLocomotive
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//проверка у
|
||||||
if ((y + _drawningLocomotiveHeight) > _pictureHeight)
|
if ((y + _drawningLocomotiveHeight) > _pictureHeight)
|
||||||
{
|
{
|
||||||
_startPosY = _pictureHeight - _drawningLocomotiveHeight;
|
_startPosY = _pictureHeight - _drawningLocomotiveHeight;
|
||||||
}
|
}
|
||||||
|
else if(y < 0)
|
||||||
|
{
|
||||||
|
_startPosY = 0;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_startPosY = y;
|
_startPosY = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//проверка х
|
||||||
if ((x + _drawningLocomotiveWidth) > _pictureWidth)
|
if ((x + _drawningLocomotiveWidth) > _pictureWidth)
|
||||||
{
|
{
|
||||||
_startPosX = _pictureWidth - _drawningLocomotiveWidth;
|
_startPosX = _pictureWidth - _drawningLocomotiveWidth;
|
||||||
}
|
}
|
||||||
|
else if(x < 0)
|
||||||
|
{
|
||||||
|
_startPosX = 0;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_startPosX = x;
|
_startPosX = x;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user