изм
This commit is contained in:
parent
c768bdc104
commit
4d2629e9ec
@ -52,13 +52,13 @@ namespace AirBomber.DrawningObjects
|
||||
}
|
||||
public void SetPosition(int x, int y)
|
||||
{
|
||||
if (_startPosX + _PlaneWidth > _pictureWidth)
|
||||
if (x < 0 || x + _PlaneWidth > _pictureWidth)
|
||||
{
|
||||
_startPosX = _pictureWidth - _PlaneWidth;
|
||||
x = _pictureWidth - _PlaneWidth;
|
||||
}
|
||||
if (_startPosY + _PlaneHeight > 740)
|
||||
if (y < 0 || y + _PlaneWidth > _pictureHeight)
|
||||
{
|
||||
_startPosY = 740 - _PlaneHeight;
|
||||
y = _pictureHeight - _PlaneWidth;
|
||||
}
|
||||
_startPosX = x;
|
||||
_startPosY = y;
|
||||
|
Loading…
x
Reference in New Issue
Block a user