Мелкие правки
This commit is contained in:
parent
0a03f8b6d0
commit
9109bc14a0
@ -90,13 +90,13 @@ public class DrawningMonorail {
|
|||||||
can = _startPosX - EntityMonorail.Step() >= 0;
|
can = _startPosX - EntityMonorail.Step() >= 0;
|
||||||
break;
|
break;
|
||||||
case Right:
|
case Right:
|
||||||
can = _startPosX + EntityMonorail.Step() < _pictureWidth;
|
can = _startPosX + EntityMonorail.Step() + _monorailWidth< _pictureWidth;
|
||||||
break;
|
break;
|
||||||
case Down:
|
case Down:
|
||||||
can = _startPosX + EntityMonorail.Step() < _pictureHeight;
|
can = _startPosY + EntityMonorail.Step() + _monorailHeight < _pictureHeight;
|
||||||
break;
|
break;
|
||||||
case Up:
|
case Up:
|
||||||
can = _startPosX - EntityMonorail.Step() >= 0;
|
can = _startPosY - EntityMonorail.Step() >= 0;
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
return can;
|
return can;
|
||||||
@ -119,11 +119,11 @@ public class DrawningMonorail {
|
|||||||
_startPosY -= (int)EntityMonorail.Step();
|
_startPosY -= (int)EntityMonorail.Step();
|
||||||
break;
|
break;
|
||||||
case Right:
|
case Right:
|
||||||
if (_startPosX + EntityMonorail.Step() + _monorailWidth < _pictureWidth)
|
if (_startPosX + EntityMonorail.Step() + _monorailWidth <= _pictureWidth)
|
||||||
_startPosX += (int)EntityMonorail.Step();
|
_startPosX += (int)EntityMonorail.Step();
|
||||||
break;
|
break;
|
||||||
case Down:
|
case Down:
|
||||||
if (_startPosY + EntityMonorail.Step() + _monorailHeight < _pictureHeight)
|
if (_startPosY + EntityMonorail.Step() + _monorailHeight <= _pictureHeight)
|
||||||
_startPosY += (int)EntityMonorail.Step();
|
_startPosY += (int)EntityMonorail.Step();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user