PIbd-21 Potapov N.S. LabWork01 #1

Closed
ns.potapov wants to merge 8 commits from LabWork01 into main
Showing only changes of commit 783360560c - Show all commits

View File

@ -214,7 +214,7 @@ namespace ProjectStormtrooper
Point[] rocketCockPit = {
Point[] pointsRocketCockPit = {
new Point(_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5 - rocketHeight,
_startPosY + _stormtrooperHeight / 2 - bodyWidth - bodyWidth / 2 + rocketHeight / 2),
new Point(_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5,
@ -223,7 +223,7 @@ namespace ProjectStormtrooper
_startPosY + _stormtrooperHeight / 2 - bodyWidth - bodyWidth / 2 + rocketHeight)
};
Point[] rocketTail = {
Point[] pointsRocketTail = {
new Point(_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5 - rocketHeight + rocketWidth - 10,
_startPosY + _stormtrooperHeight / 2 - bodyWidth - bodyWidth / 2 + rocketHeight / 2),
new Point(_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5 + rocketWidth,
@ -232,31 +232,31 @@ namespace ProjectStormtrooper
_startPosY + _stormtrooperHeight / 2 - bodyWidth - bodyWidth / 2 + rocketHeight + bodyWidth / 2 - rocketHeight / 2)
};
g.FillPolygon(brushRed, rocketCockPit);
g.DrawPolygon(penBlack, rocketCockPit);
g.FillPolygon(brushRed, pointsRocketCockPit);
g.DrawPolygon(penBlack, pointsRocketCockPit);
g.FillPolygon(brushBlack, rocketTail);
g.DrawPolygon(penBlack, rocketTail);
g.FillPolygon(brushBlack, pointsRocketTail);
g.DrawPolygon(penBlack, pointsRocketTail);
for (int i = 0; i < rocketCockPit.Length; i++)
for (int i = 0; i < pointsRocketCockPit.Length; i++)
{
Point p = rocketCockPit[i];
Point p = pointsRocketCockPit[i];
p.Y = _startPosY + _stormtrooperHeight - (p.Y - _startPosY);
rocketCockPit[i] = p;
pointsRocketCockPit[i] = p;
}
for (int i = 0; i < rocketTail.Length; i++)
for (int i = 0; i < pointsRocketTail.Length; i++)
{
Point p = rocketTail[i];
Point p = pointsRocketTail[i];
p.Y = _startPosY + _stormtrooperHeight - (p.Y - _startPosY);
rocketTail[i] = p;
pointsRocketTail[i] = p;
}
g.FillPolygon(brushRed, rocketCockPit);
g.DrawPolygon(penBlack, rocketCockPit);
g.FillPolygon(brushRed, pointsRocketCockPit);
g.DrawPolygon(penBlack, pointsRocketCockPit);
g.FillPolygon(brushBlack, rocketTail);
g.DrawPolygon(penBlack, rocketTail);
g.FillPolygon(brushBlack, pointsRocketTail);
g.DrawPolygon(penBlack, pointsRocketTail);
g.FillRectangle(brushAdditionalColor,
_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5,