This commit is contained in:
Александр Чегодаев 2023-12-13 23:10:44 +04:00
parent b9edd805a8
commit 4a1039d391
3 changed files with 2 additions and 20 deletions

View File

@ -9,7 +9,6 @@ namespace Cruiser
{
internal class DrawningCruiser
{
public EntityCruiser? EntityCruiser { get; private set; }
private int _pictureWidth;
@ -56,7 +55,6 @@ additionalColor, bool vert, bool rocket, int width, int height)
}
switch (direction)
{
case DirectionType.Left:
if (_startPosX - EntityCruiser.Step > 0)
{
@ -88,7 +86,6 @@ additionalColor, bool vert, bool rocket, int width, int height)
{
_startPosX += _pictureWidth - _startPosX - _cruiserWidth;
}
break;
case DirectionType.Down:
@ -114,10 +111,6 @@ additionalColor, bool vert, bool rocket, int width, int height)
Brush additionalBrush = new SolidBrush(EntityCruiser.AdditionalColor);
Brush BodyColor = new SolidBrush(EntityCruiser.BodyColor);
GraphicsPath path1 = new GraphicsPath();
path1.AddLine(_startPosX + 100, _startPosY + 0, _startPosX + 0, _startPosY + 0);
path1.AddLine(_startPosX + 0, _startPosY + 50, _startPosX + 0, _startPosY + 0);
@ -128,7 +121,6 @@ additionalColor, bool vert, bool rocket, int width, int height)
g.FillPath(additionalBrush, path1);
g.DrawPath(pen, path1);
Brush brBlack = new SolidBrush(Color.Black);
g.DrawRectangle(pen, _startPosX - 3, _startPosY + 7, 3, 15);
@ -136,24 +128,20 @@ additionalColor, bool vert, bool rocket, int width, int height)
g.DrawRectangle(pen, _startPosX - 3, _startPosY + 25, 3, 15);
g.FillRectangle(brBlack, _startPosX - 3, _startPosY + 25, 3, 15);
g.DrawRectangle(pen, _startPosX + 60, _startPosY + 12, 20, 25);
g.FillRectangle(brBlack, _startPosX + 60, _startPosY + 12, 20, 25);
g.DrawRectangle(pen, _startPosX + 30, _startPosY + 19, 30, 13);
g.FillRectangle(brBlack, _startPosX + 30, _startPosY + 19, 30, 13);
if (EntityCruiser.Vert)
{
Brush brRed = new SolidBrush(Color.Red);
g.FillEllipse(brRed, _startPosX + 95, _startPosY + 15, 20, 20);
g.DrawEllipse(pen, _startPosX + 95, _startPosY + 15, 20, 20);
}
if (EntityCruiser.Rocket)
{
g.DrawEllipse(pen, _startPosX + 8, _startPosY + 3, 15, 12);
g.FillEllipse(brBlack, _startPosX + 8, _startPosY + 3, 15, 12);
@ -162,11 +150,8 @@ additionalColor, bool vert, bool rocket, int width, int height)
g.DrawEllipse(pen, _startPosX + 8, _startPosY + 33, 15, 12);
g.FillEllipse(brBlack, _startPosX + 8, _startPosY + 33, 15, 12);
}
}
}
}

View File

@ -8,7 +8,6 @@ namespace Cruiser
{
internal class EntityCruiser
{
public int Speed { get; private set; }
public double Weight { get; private set; }
@ -17,7 +16,6 @@ namespace Cruiser
public Color AdditionalColor { get; private set; }
public bool Vert { get; private set; }
public bool Rocket { get; private set; }

View File

@ -4,7 +4,6 @@ namespace Cruiser
{
public partial class FormCruiser : Form
{
private DrawningCruiser? _drawningCruiser;
public FormCruiser()