Доработка DrawningCruiser

This commit is contained in:
Almaz 2024-04-15 17:32:53 +04:00
parent 801caf48d3
commit 2238e92799

View File

@ -133,13 +133,13 @@ public class DrawningCruiser
}
return true;
case DirectionType.Right:
if (_startPosX.Value - EntityCruiser.Step > 0)
if (_startPosX.Value + _drawningCruiserWidth + EntityCruiser.Step < _pictureWidth)
{
_startPosX += (int)EntityCruiser.Step;
}
return true;
case DirectionType.Down:
if (_startPosY.Value - EntityCruiser.Step > 0)
if (_startPosY.Value + _drawingCruiserHeight + EntityCruiser.Step < _pictureHeight)
{
_startPosY += (int)EntityCruiser.Step;
}