ISEbd-22 Alimova M.S. Lab Work 02 #2

Closed
malimova wants to merge 21 commits from Lab2 into Lab1
5 changed files with 14 additions and 15 deletions
Showing only changes of commit c8cd888bf1 - Show all commits

View File

@ -23,7 +23,6 @@ namespace AirBomber
/// <param name="height">Высота картинки</param>
public DrawningAirBomber(int speed, double weight, Color bodyColor, Color
additionalColor, bool bombs, Color bombsColor, bool fuelTanks, int width, int height) :
base(speed, weight, bodyColor, width, height, 160, 118)
{
if (EntityAirPlane != null)
@ -42,18 +41,17 @@ namespace AirBomber
Brush bombsColor = new SolidBrush(airBomber.BombsColor);
base.DrawPlane(g);
// обвесы
g.FillEllipse(bombsColor, _startPosX + 90, _startPosY + 20, 15, 29);
g.DrawEllipse(pen, _startPosX + 90, _startPosY + 20, 15, 29);
g.FillEllipse(bombsColor, _startPosX + 90, _startPosY + 70, 15, 29);
g.DrawEllipse(pen, _startPosX + 90, _startPosY + 70, 15, 29);
g.FillEllipse(bombsColor, _startPosX + 140, _startPosY + 50, 15, 15);
g.DrawEllipse(pen, _startPosX + 140, _startPosY + 50, 15, 15);
g.FillEllipse(bombsColor, _startPosX + 90, _startPosY + 20, 15, 29);
g.DrawEllipse(pen, _startPosX + 90, _startPosY + 20, 15, 29);
g.FillEllipse(bombsColor, _startPosX + 90, _startPosY + 70, 15, 29);
g.DrawEllipse(pen, _startPosX + 90, _startPosY + 70, 15, 29);
g.FillEllipse(bombsColor, _startPosX + 140, _startPosY + 50, 15, 15);
g.DrawEllipse(pen, _startPosX + 140, _startPosY + 50, 15, 15);
// fueltanks
g.FillRectangle(additionalBrush, _startPosX + 63, _startPosY + 34, 20, 15);
g.DrawRectangle(pen, _startPosX + 63, _startPosY + 34, 20, 15);
g.FillRectangle(additionalBrush, _startPosX + 63, _startPosY + 70, 20, 15);
g.DrawRectangle(pen, _startPosX + 63, _startPosY + 70, 20, 15);
g.FillRectangle(additionalBrush, _startPosX + 63, _startPosY + 34, 20, 15);
g.DrawRectangle(pen, _startPosX + 63, _startPosY + 34, 20, 15);
g.FillRectangle(additionalBrush, _startPosX + 63, _startPosY + 70, 20, 15);
g.DrawRectangle(pen, _startPosX + 63, _startPosY + 70, 20, 15);
}
}
}

View File

@ -49,6 +49,10 @@ namespace AirBomber
width, int height)
{
// TODO: Продумать проверки
if (width < _airPlaneWidth || height < _airPlaneHeight)
{
return;
}
_pictureWidth = width;
_pictureHeight = height;
EntityAirPlane = new EntityAirPlane(speed, weight, bodyColor);

View File

@ -37,6 +37,5 @@ namespace AirBomber
Weight = weight;
BodyColor = bodyColor;
}
}
}

View File

@ -15,7 +15,6 @@ namespace AirBomber
return objParams.RightBorder >= FieldWidth - GetStep() && objParams.DownBorder >= FieldHeight - GetStep();
}
protected override void MoveToTarget()
{
var objParams = GetObjectParameters;

View File

@ -7,7 +7,6 @@ namespace AirBomber
/// </summary>
[STAThread]
static void Main()
{
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.