Мелкие правки
This commit is contained in:
parent
0a03f8b6d0
commit
9109bc14a0
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user