Мелкие правки

This commit is contained in:
gg12 darfren 2023-10-16 16:45:33 +04:00
parent 0a03f8b6d0
commit 9109bc14a0

View File

@ -90,13 +90,13 @@ public class DrawningMonorail {
can = _startPosX - EntityMonorail.Step() >= 0;
break;
case Right:
can = _startPosX + EntityMonorail.Step() < _pictureWidth;
can = _startPosX + EntityMonorail.Step() + _monorailWidth< _pictureWidth;
break;
case Down:
can = _startPosX + EntityMonorail.Step() < _pictureHeight;
can = _startPosY + EntityMonorail.Step() + _monorailHeight < _pictureHeight;
break;
case Up:
can = _startPosX - EntityMonorail.Step() >= 0;
can = _startPosY - EntityMonorail.Step() >= 0;
break;
};
return can;
@ -119,11 +119,11 @@ public class DrawningMonorail {
_startPosY -= (int)EntityMonorail.Step();
break;
case Right:
if (_startPosX + EntityMonorail.Step() + _monorailWidth < _pictureWidth)
if (_startPosX + EntityMonorail.Step() + _monorailWidth <= _pictureWidth)
_startPosX += (int)EntityMonorail.Step();
break;
case Down:
if (_startPosY + EntityMonorail.Step() + _monorailHeight < _pictureHeight)
if (_startPosY + EntityMonorail.Step() + _monorailHeight <= _pictureHeight)
_startPosY += (int)EntityMonorail.Step();
break;
}