измененеи в SetPosition
This commit is contained in:
parent
b581a744c7
commit
7a645e85f8
@ -53,16 +53,16 @@
|
||||
/// <param name="height">Высота картинки</param>
|
||||
public void SetPosition(int x, int y, int width, int height)
|
||||
{
|
||||
_startPosX = x;
|
||||
_startPosY = y;
|
||||
_pictureWidth = width;
|
||||
_pictureHeight = height;
|
||||
|
||||
if (width <= _warplaneWidth || height <= _warplaneHeight || x < 0 || y < 0 || x > width - _warplaneWidth || y > height - _warplaneHeight)
|
||||
if (width <= _warplaneWidth || height <= _warplaneHeight || x < 0 || y < 0 || x > width - _warplaneWidth || y > height - _warplaneHeight)
|
||||
{
|
||||
_pictureWidth = null;
|
||||
_pictureHeight = null;
|
||||
}
|
||||
return;
|
||||
}
|
||||
_startPosX = x;
|
||||
_startPosY = y;
|
||||
_pictureWidth = width;
|
||||
_pictureHeight = height;
|
||||
}
|
||||
/// <summary>
|
||||
/// Изменение направления пермещения
|
||||
|
Loading…
x
Reference in New Issue
Block a user