Исправил баг с отрисовкой трактора
This commit is contained in:
parent
4b3b345b66
commit
23d6e5a687
@ -28,6 +28,10 @@ namespace Traktor
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!DrawCheck())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
Pen pen_Black_1pxl = new Pen(Color.Black, 1);
|
Pen pen_Black_1pxl = new Pen(Color.Black, 1);
|
||||||
Pen pen_Black_2pxl = new Pen(Color.Black, 2);
|
Pen pen_Black_2pxl = new Pen(Color.Black, 2);
|
||||||
Brush brBlack = new SolidBrush(Color.Black);
|
Brush brBlack = new SolidBrush(Color.Black);
|
||||||
|
@ -93,6 +93,15 @@ namespace Traktor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool DrawCheck()
|
||||||
|
{
|
||||||
|
if (startPosX < 0 || startPosY < 0 || !pictureHeight.HasValue || !pictureWidth.HasValue)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
//Отрисовка сущности
|
//Отрисовка сущности
|
||||||
public virtual void DrawEntity(Graphics g)
|
public virtual void DrawEntity(Graphics g)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user