Исправлена ошибка в названии переменной
This commit is contained in:
parent
5f9528e536
commit
1936a98d43
@ -150,21 +150,21 @@ namespace ProjectStormtrooper
|
|||||||
Brush brushBodyColor = new SolidBrush(EntityStormtrooper.BodyColor);
|
Brush brushBodyColor = new SolidBrush(EntityStormtrooper.BodyColor);
|
||||||
Brush brushAdditionalColor = new SolidBrush(EntityStormtrooper.AdditionalColor);
|
Brush brushAdditionalColor = new SolidBrush(EntityStormtrooper.AdditionalColor);
|
||||||
|
|
||||||
// Ширина фюзеляжа
|
// Высота фюзеляжа
|
||||||
int bodyWidth = _stormtrooperHeight / 9;
|
int bodyHeight = _stormtrooperHeight / 9;
|
||||||
|
|
||||||
// Рисуем бомбы
|
// Рисуем бомбы
|
||||||
if (EntityStormtrooper.Bombs)
|
if (EntityStormtrooper.Bombs)
|
||||||
{
|
{
|
||||||
Point[] pointsBombTail = {
|
Point[] pointsBombTail = {
|
||||||
new Point(_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 8 + bodyWidth * 3 - 5,
|
new Point(_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 8 + bodyHeight * 3 - 5,
|
||||||
_startPosY + _stormtrooperHeight / 2 - bodyWidth / 2 - _stormtrooperHeight / 3 + bodyWidth / 2),
|
_startPosY + _stormtrooperHeight / 2 - bodyHeight / 2 - _stormtrooperHeight / 3 + bodyHeight / 2),
|
||||||
new Point(_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 8 + bodyWidth * 3 + 5,
|
new Point(_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 8 + bodyHeight * 3 + 5,
|
||||||
_startPosY + _stormtrooperHeight / 2 - bodyWidth / 2 - _stormtrooperHeight / 3 + bodyWidth / 2 - 5),
|
_startPosY + _stormtrooperHeight / 2 - bodyHeight / 2 - _stormtrooperHeight / 3 + bodyHeight / 2 - 5),
|
||||||
new Point(_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 8 + bodyWidth * 3 + 5,
|
new Point(_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 8 + bodyHeight * 3 + 5,
|
||||||
_startPosY + _stormtrooperHeight / 2 - bodyWidth / 2 - _stormtrooperHeight / 3 + bodyWidth / 2 + 5),
|
_startPosY + _stormtrooperHeight / 2 - bodyHeight / 2 - _stormtrooperHeight / 3 + bodyHeight / 2 + 5),
|
||||||
new Point(_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 8 + bodyWidth * 3 - 5,
|
new Point(_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 8 + bodyHeight * 3 - 5,
|
||||||
_startPosY + _stormtrooperHeight / 2 - bodyWidth / 2 - _stormtrooperHeight / 3 + bodyWidth / 2)
|
_startPosY + _stormtrooperHeight / 2 - bodyHeight / 2 - _stormtrooperHeight / 3 + bodyHeight / 2)
|
||||||
};
|
};
|
||||||
|
|
||||||
g.FillPolygon(brushAdditionalColor, pointsBombTail);
|
g.FillPolygon(brushAdditionalColor, pointsBombTail);
|
||||||
@ -182,51 +182,51 @@ namespace ProjectStormtrooper
|
|||||||
|
|
||||||
g.FillEllipse(brushAdditionalColor,
|
g.FillEllipse(brushAdditionalColor,
|
||||||
_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 8,
|
_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 8,
|
||||||
_startPosY + _stormtrooperHeight / 2 - bodyWidth / 2 - _stormtrooperHeight / 3,
|
_startPosY + _stormtrooperHeight / 2 - bodyHeight / 2 - _stormtrooperHeight / 3,
|
||||||
bodyWidth * 3,
|
bodyHeight * 3,
|
||||||
bodyWidth);
|
bodyHeight);
|
||||||
g.DrawEllipse(penBlack,
|
g.DrawEllipse(penBlack,
|
||||||
_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 8,
|
_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 8,
|
||||||
_startPosY + _stormtrooperHeight / 2 - bodyWidth / 2 - _stormtrooperHeight / 3,
|
_startPosY + _stormtrooperHeight / 2 - bodyHeight / 2 - _stormtrooperHeight / 3,
|
||||||
bodyWidth * 3,
|
bodyHeight * 3,
|
||||||
bodyWidth);
|
bodyHeight);
|
||||||
|
|
||||||
g.FillEllipse(brushAdditionalColor,
|
g.FillEllipse(brushAdditionalColor,
|
||||||
_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 8,
|
_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 8,
|
||||||
_startPosY + _stormtrooperHeight / 2 - bodyWidth / 2 + _stormtrooperHeight / 3,
|
_startPosY + _stormtrooperHeight / 2 - bodyHeight / 2 + _stormtrooperHeight / 3,
|
||||||
bodyWidth * 3,
|
bodyHeight * 3,
|
||||||
bodyWidth);
|
bodyHeight);
|
||||||
g.DrawEllipse(penBlack,
|
g.DrawEllipse(penBlack,
|
||||||
_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 8,
|
_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 8,
|
||||||
_startPosY + _stormtrooperHeight / 2 - bodyWidth / 2 + _stormtrooperHeight / 3,
|
_startPosY + _stormtrooperHeight / 2 - bodyHeight / 2 + _stormtrooperHeight / 3,
|
||||||
bodyWidth * 3,
|
bodyHeight * 3,
|
||||||
bodyWidth);
|
bodyHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Рисуем ракеты
|
// Рисуем ракеты
|
||||||
if (EntityStormtrooper.Rockets)
|
if (EntityStormtrooper.Rockets)
|
||||||
{
|
{
|
||||||
int rocketWidth = bodyWidth * 4;
|
int rocketWidth = bodyHeight * 4;
|
||||||
int rocketHeight = bodyWidth / 2;
|
int rocketHeight = bodyHeight / 2;
|
||||||
|
|
||||||
Brush brushRed = new SolidBrush(Color.Red);
|
Brush brushRed = new SolidBrush(Color.Red);
|
||||||
|
|
||||||
Point[] pointsRocketCockPit = {
|
Point[] pointsRocketCockPit = {
|
||||||
new Point(_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5 - rocketHeight,
|
new Point(_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5 - rocketHeight,
|
||||||
_startPosY + _stormtrooperHeight / 2 - bodyWidth - bodyWidth / 2 + rocketHeight / 2),
|
_startPosY + _stormtrooperHeight / 2 - bodyHeight - bodyHeight / 2 + rocketHeight / 2),
|
||||||
new Point(_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5,
|
new Point(_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5,
|
||||||
_startPosY + _stormtrooperHeight / 2 - bodyWidth - bodyWidth / 2),
|
_startPosY + _stormtrooperHeight / 2 - bodyHeight - bodyHeight / 2),
|
||||||
new Point(_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5,
|
new Point(_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5,
|
||||||
_startPosY + _stormtrooperHeight / 2 - bodyWidth - bodyWidth / 2 + rocketHeight)
|
_startPosY + _stormtrooperHeight / 2 - bodyHeight - bodyHeight / 2 + rocketHeight)
|
||||||
};
|
};
|
||||||
|
|
||||||
Point[] pointsRocketTail = {
|
Point[] pointsRocketTail = {
|
||||||
new Point(_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5 - rocketHeight + rocketWidth - 10,
|
new Point(_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5 - rocketHeight + rocketWidth - 10,
|
||||||
_startPosY + _stormtrooperHeight / 2 - bodyWidth - bodyWidth / 2 + rocketHeight / 2),
|
_startPosY + _stormtrooperHeight / 2 - bodyHeight - bodyHeight / 2 + rocketHeight / 2),
|
||||||
new Point(_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5 + rocketWidth,
|
new Point(_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5 + rocketWidth,
|
||||||
_startPosY + _stormtrooperHeight / 2 - bodyWidth * 2 + rocketHeight / 2),
|
_startPosY + _stormtrooperHeight / 2 - bodyHeight * 2 + rocketHeight / 2),
|
||||||
new Point(_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5 + rocketWidth,
|
new Point(_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5 + rocketWidth,
|
||||||
_startPosY + _stormtrooperHeight / 2 - bodyWidth - bodyWidth / 2 + rocketHeight + bodyWidth / 2 - rocketHeight / 2)
|
_startPosY + _stormtrooperHeight / 2 - bodyHeight - bodyHeight / 2 + rocketHeight + bodyHeight / 2 - rocketHeight / 2)
|
||||||
};
|
};
|
||||||
|
|
||||||
g.FillPolygon(brushRed, pointsRocketCockPit);
|
g.FillPolygon(brushRed, pointsRocketCockPit);
|
||||||
@ -257,23 +257,23 @@ namespace ProjectStormtrooper
|
|||||||
|
|
||||||
g.FillRectangle(brushAdditionalColor,
|
g.FillRectangle(brushAdditionalColor,
|
||||||
_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5,
|
_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5,
|
||||||
_startPosY + _stormtrooperHeight / 2 - bodyWidth - bodyWidth / 2,
|
_startPosY + _stormtrooperHeight / 2 - bodyHeight - bodyHeight / 2,
|
||||||
rocketWidth,
|
rocketWidth,
|
||||||
rocketHeight);
|
rocketHeight);
|
||||||
g.DrawRectangle(penBlack,
|
g.DrawRectangle(penBlack,
|
||||||
_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5,
|
_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5,
|
||||||
_startPosY + _stormtrooperHeight / 2 - bodyWidth - bodyWidth / 2,
|
_startPosY + _stormtrooperHeight / 2 - bodyHeight - bodyHeight / 2,
|
||||||
rocketWidth,
|
rocketWidth,
|
||||||
rocketHeight);
|
rocketHeight);
|
||||||
|
|
||||||
g.FillRectangle(brushAdditionalColor,
|
g.FillRectangle(brushAdditionalColor,
|
||||||
_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5,
|
_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5,
|
||||||
_startPosY + _stormtrooperHeight / 2 + bodyWidth / 2 + bodyWidth / 2,
|
_startPosY + _stormtrooperHeight / 2 + bodyHeight / 2 + bodyHeight / 2,
|
||||||
rocketWidth,
|
rocketWidth,
|
||||||
rocketHeight);
|
rocketHeight);
|
||||||
g.DrawRectangle(penBlack,
|
g.DrawRectangle(penBlack,
|
||||||
_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5,
|
_startPosX + _stormtrooperWidth / 2 - _stormtrooperWidth / 5,
|
||||||
_startPosY + _stormtrooperHeight / 2 + bodyWidth / 2 + bodyWidth / 2,
|
_startPosY + _stormtrooperHeight / 2 + bodyHeight / 2 + bodyHeight / 2,
|
||||||
rocketWidth,
|
rocketWidth,
|
||||||
rocketHeight);
|
rocketHeight);
|
||||||
}
|
}
|
||||||
@ -282,8 +282,8 @@ namespace ProjectStormtrooper
|
|||||||
|
|
||||||
Point[] pointsCockPit = {
|
Point[] pointsCockPit = {
|
||||||
new Point(_startPosX, _startPosY + _stormtrooperHeight / 2),
|
new Point(_startPosX, _startPosY + _stormtrooperHeight / 2),
|
||||||
new Point(_startPosX + _stormtrooperWidth / 8, _startPosY + _stormtrooperHeight / 2 - bodyWidth / 2),
|
new Point(_startPosX + _stormtrooperWidth / 8, _startPosY + _stormtrooperHeight / 2 - bodyHeight / 2),
|
||||||
new Point(_startPosX + _stormtrooperWidth / 8, _startPosY + _stormtrooperHeight / 2 + bodyWidth / 2)
|
new Point(_startPosX + _stormtrooperWidth / 8, _startPosY + _stormtrooperHeight / 2 + bodyHeight / 2)
|
||||||
};
|
};
|
||||||
|
|
||||||
g.FillPolygon(brushBlack, pointsCockPit);
|
g.FillPolygon(brushBlack, pointsCockPit);
|
||||||
@ -316,8 +316,8 @@ namespace ProjectStormtrooper
|
|||||||
|
|
||||||
// Рисуем фюзеляж
|
// Рисуем фюзеляж
|
||||||
|
|
||||||
g.FillRectangle(brushBodyColor, _startPosX + _stormtrooperWidth / 8, _startPosY + _stormtrooperHeight / 2 - bodyWidth / 2, _stormtrooperWidth - _stormtrooperWidth / 8, bodyWidth);
|
g.FillRectangle(brushBodyColor, _startPosX + _stormtrooperWidth / 8, _startPosY + _stormtrooperHeight / 2 - bodyHeight / 2, _stormtrooperWidth - _stormtrooperWidth / 8, bodyHeight);
|
||||||
g.DrawRectangle(penBlack, _startPosX + _stormtrooperWidth / 8, _startPosY + _stormtrooperHeight / 2 - bodyWidth / 2, _stormtrooperWidth - _stormtrooperWidth / 8, bodyWidth);
|
g.DrawRectangle(penBlack, _startPosX + _stormtrooperWidth / 8, _startPosY + _stormtrooperHeight / 2 - bodyHeight / 2, _stormtrooperWidth - _stormtrooperWidth / 8, bodyHeight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user