Перерисовка локомотива
This commit is contained in:
parent
63173ed478
commit
1d32aa0b0f
@ -33,7 +33,7 @@ public class DrawningLocomotive
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Высота прорисовки паровоза
|
/// Высота прорисовки паровоза
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly int _drawningLocomotiveHeight = 100;
|
private readonly int _drawningLocomotiveHeight = 70;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Координата X объекта
|
/// Координата X объекта
|
||||||
@ -249,27 +249,27 @@ public class DrawningLocomotive
|
|||||||
//локомотив
|
//локомотив
|
||||||
Brush br = new SolidBrush(EntityLocomotive.BodyColor);
|
Brush br = new SolidBrush(EntityLocomotive.BodyColor);
|
||||||
Brush blBr = new SolidBrush(Color.Black);
|
Brush blBr = new SolidBrush(Color.Black);
|
||||||
g.DrawRectangle(pen, _startPosX.Value, _startPosY.Value + 60, 140, 20);
|
g.DrawRectangle(pen, _startPosX.Value, _startPosY.Value + 30, 140, 20);
|
||||||
g.FillRectangle(br, _startPosX.Value, _startPosY.Value + 60, 140, 20);
|
g.FillRectangle(br, _startPosX.Value, _startPosY.Value + 30, 140, 20);
|
||||||
Point point1 = new Point(_startPosX.Value, _startPosY.Value + 60);
|
Point point1 = new Point(_startPosX.Value, _startPosY.Value + 30);
|
||||||
Point point2 = new Point(_startPosX.Value + 20, _startPosY.Value + 30);
|
Point point2 = new Point(_startPosX.Value + 20, _startPosY.Value);
|
||||||
Point point3 = new Point(_startPosX.Value + 140, _startPosY.Value + 30);
|
Point point3 = new Point(_startPosX.Value + 140, _startPosY.Value);
|
||||||
Point point4 = new Point(_startPosX.Value + 140, _startPosY.Value + 60);
|
Point point4 = new Point(_startPosX.Value + 140, _startPosY.Value + 30);
|
||||||
Point[] body = { point1, point2, point3, point4 };
|
Point[] body = { point1, point2, point3, point4 };
|
||||||
g.DrawPolygon(pen, body);
|
g.DrawPolygon(pen, body);
|
||||||
g.FillPolygon(br, body);
|
g.FillPolygon(br, body);
|
||||||
g.DrawRectangle(pen, _startPosX.Value + 140, _startPosY.Value + 40, 10, 40);
|
g.DrawRectangle(pen, _startPosX.Value + 140, _startPosY.Value + 10, 10, 40);
|
||||||
g.FillRectangle(br, _startPosX.Value + 140, _startPosY.Value + 40, 10, 40);
|
g.FillRectangle(br, _startPosX.Value + 140, _startPosY.Value + 10, 10, 40);
|
||||||
|
|
||||||
//колеса
|
//колеса
|
||||||
g.DrawEllipse(pen, _startPosX.Value, _startPosY.Value + 80, 20, 20);
|
g.DrawEllipse(pen, _startPosX.Value, _startPosY.Value + 50, 20, 20);
|
||||||
g.FillEllipse(blBr, _startPosX.Value, _startPosY.Value + 80, 20, 20);
|
g.FillEllipse(blBr, _startPosX.Value, _startPosY.Value + 50, 20, 20);
|
||||||
g.DrawEllipse(pen, _startPosX.Value + 30, _startPosY.Value + 80, 20, 20);
|
g.DrawEllipse(pen, _startPosX.Value + 30, _startPosY.Value + 50, 20, 20);
|
||||||
g.FillEllipse(blBr, _startPosX.Value + 30, _startPosY.Value + 80, 20, 20);
|
g.FillEllipse(blBr, _startPosX.Value + 30, _startPosY.Value + 50, 20, 20);
|
||||||
g.DrawEllipse(pen, _startPosX.Value + 90, _startPosY.Value + 80, 20, 20);
|
g.DrawEllipse(pen, _startPosX.Value + 90, _startPosY.Value + 50, 20, 20);
|
||||||
g.FillEllipse(blBr, _startPosX.Value + 90, _startPosY.Value + 80, 20, 20);
|
g.FillEllipse(blBr, _startPosX.Value + 90, _startPosY.Value + 50, 20, 20);
|
||||||
g.DrawEllipse(pen, _startPosX.Value + 120, _startPosY.Value + 80, 20, 20);
|
g.DrawEllipse(pen, _startPosX.Value + 120, _startPosY.Value + 50, 20, 20);
|
||||||
g.FillEllipse(blBr, _startPosX.Value + 120, _startPosY.Value + 80, 20, 20);
|
g.FillEllipse(blBr, _startPosX.Value + 120, _startPosY.Value + 50, 20, 20);
|
||||||
|
|
||||||
// отсек для топлива
|
// отсек для топлива
|
||||||
//if (EntityWarmlyLocomotive.FuelTank)
|
//if (EntityWarmlyLocomotive.FuelTank)
|
||||||
|
@ -32,6 +32,9 @@ public class DrawningWarmlyLocomotive : DrawningLocomotive
|
|||||||
g.FillRectangle(additionalBrush, _startPosX.Value + 40, _startPosY.Value, 20, 40);
|
g.FillRectangle(additionalBrush, _startPosX.Value + 40, _startPosY.Value, 20, 40);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_startPosY += 30;
|
||||||
|
base.DrawTransport(g);
|
||||||
|
_startPosY -= 30;
|
||||||
|
|
||||||
// отсек для топлива
|
// отсек для топлива
|
||||||
if (warmlyLocomotive.FuelTank)
|
if (warmlyLocomotive.FuelTank)
|
||||||
@ -40,5 +43,6 @@ public class DrawningWarmlyLocomotive : DrawningLocomotive
|
|||||||
g.FillRectangle(additionalBrush, _startPosX.Value + 80, _startPosY.Value + 40, 50, 40);
|
g.FillRectangle(additionalBrush, _startPosX.Value + 80, _startPosY.Value + 40, 50, 40);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user