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