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