ura vse cool
This commit is contained in:
parent
3b19666cc5
commit
665d472714
@ -34,11 +34,11 @@ internal class DrawningDumpTruck
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Ширина прорисовки автомобиля
|
/// Ширина прорисовки автомобиля
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly int _drawningTruckWidth = 60;
|
private readonly int _drawningTruckWidth = 135;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Высота прорисовки автомобиля
|
/// Высота прорисовки автомобиля
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly int _drawningTruckHeight = 110;
|
private readonly int _drawningTruckHeight = 85;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Инициализация свойств
|
/// Инициализация свойств
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -99,30 +99,27 @@ internal class DrawningDumpTruck
|
|||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
_startPosX = x;
|
if (!_pictureHeight.HasValue || !_pictureWidth.HasValue)
|
||||||
_startPosY=y;
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_startPosX = x;
|
||||||
|
_startPosY = y;
|
||||||
|
|
||||||
//if (!_pictureHeight.HasValue || !_pictureWidth.HasValue)
|
if (_startPosX < 0) _startPosX = 0;
|
||||||
//{
|
if (_startPosY < 0) _startPosY = 0;
|
||||||
// return;
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// _startPosX = x;
|
|
||||||
// _startPosY = y;
|
|
||||||
|
|
||||||
// if (_startPosX < 0) _startPosX = 0;
|
if (_startPosX + _drawningTruckWidth > _pictureWidth.Value)
|
||||||
// if (_startPosY < 0) _startPosY = 0;
|
{
|
||||||
|
_startPosX = _pictureWidth.Value - _drawningTruckWidth;
|
||||||
// if (_startPosX + _drawningTruckWidth > _pictureWidth.Value)
|
}
|
||||||
// {
|
if (_startPosY + _drawningTruckHeight > _pictureHeight.Value)
|
||||||
// _startPosX = _pictureWidth.Value - _drawningTruckWidth;
|
{
|
||||||
// }
|
_startPosY = _pictureHeight.Value - _drawningTruckHeight;
|
||||||
// if (_startPosY + _drawningTruckHeight > _pictureHeight.Value)
|
}
|
||||||
// {
|
}
|
||||||
// _startPosY = _pictureHeight.Value - _drawningTruckHeight;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool MoveTransport(DirectionType direction)
|
public bool MoveTransport(DirectionType direction)
|
||||||
|
Loading…
Reference in New Issue
Block a user