diff --git a/AntiAirCraftGun/AntiAirCraftGun/DrawingObjects/BaseDrawingAntiAirCraftGun.cs b/AntiAirCraftGun/AntiAirCraftGun/DrawingObjects/BaseDrawingAntiAirCraftGun.cs index f4ba407..9dc56d4 100644 --- a/AntiAirCraftGun/AntiAirCraftGun/DrawingObjects/BaseDrawingAntiAirCraftGun.cs +++ b/AntiAirCraftGun/AntiAirCraftGun/DrawingObjects/BaseDrawingAntiAirCraftGun.cs @@ -81,9 +81,9 @@ namespace AntiAircraftGun.DrawingObjects //вверх DirectionType.Up => _startPosY - AntiAirСraftGun.Step > 0, // вправо - DirectionType.Right =>_startPosX + AntiAirСraftGun.Step < _pictureWidth - 110, - //вниз - DirectionType.Down => _startPosY + AntiAirСraftGun.Step < _pictureHeight - 60, + DirectionType.Right =>_startPosX + AntiAirСraftGun.Step + _zenitWidth < _pictureWidth, + //вниз + DirectionType.Down => _startPosY + AntiAirСraftGun.Step + _zenitHeight< _pictureHeight, _ => false, }; } diff --git a/AntiAirCraftGun/AntiAirCraftGun/FormAntiAirCraftGun.cs b/AntiAirCraftGun/AntiAirCraftGun/FormAntiAirCraftGun.cs index 7fe4cfe..3ae75cd 100644 --- a/AntiAirCraftGun/AntiAirCraftGun/FormAntiAirCraftGun.cs +++ b/AntiAirCraftGun/AntiAirCraftGun/FormAntiAirCraftGun.cs @@ -145,5 +145,5 @@ namespace AntiAircraftGun } - } + } } \ No newline at end of file