ISEbd-22 Alimova M.S. Lab Work 02 #2
@ -30,17 +30,16 @@ namespace AirBomber
|
||||
{
|
||||
EntityAirPlane = new EntityAirBomber(speed, weight, bodyColor, additionalColor, bombs, fuelTanks);
|
||||
}
|
||||
|
||||
}
|
||||
public override void DrawPlane(Graphics g)
|
||||
{
|
||||
if (EntityAirPlane is not EntityAirPlane sportCar)
|
||||
if (EntityAirPlane is not EntityAirPlane airBomber)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Pen pen = new(Color.Black);
|
||||
Brush additionalBrush = new
|
||||
SolidBrush(airBomber.AdditionalColor);
|
||||
Brush additionalBrush = new SolidBrush(airBomber.AdditionalColor);
|
||||
base.DrawPlane(g);
|
||||
// обвесы
|
||||
if (airBomber.Bombs)
|
||||
{
|
||||
@ -51,9 +50,8 @@ namespace AirBomber
|
||||
g.FillEllipse(bombsColor, _startPosX + 140, _startPosY + 50, 15, 15);
|
||||
g.DrawEllipse(pen, _startPosX + 140, _startPosY + 50, 15, 15);
|
||||
}
|
||||
base.DrawPlane(g);
|
||||
// fueltanks
|
||||
if (EntityAirBomber.FuelTanks)
|
||||
if (airBomber.FuelTanks)
|
||||
{
|
||||
g.FillRectangle(additionalBrush, _startPosX + 63, _startPosY + 34, 20, 15);
|
||||
g.DrawRectangle(pen, _startPosX + 63, _startPosY + 34, 20, 15);
|
||||
|
Loading…
Reference in New Issue
Block a user