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