From 23663c6c473a26163cb78e3afc935d8e581fb73a Mon Sep 17 00:00:00 2001 From: malimova Date: Fri, 6 Oct 2023 21:44:42 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D0=BE=D1=88=D0=B8?= =?UTF-8?q?=D0=B1=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AirBomber/AirBomber/DrawningAirBomber.cs | 11 ++++++----- AirBomber/AirBomber/DrawningAirPlane.cs | 1 + AirBomber/AirBomber/EntityAirBomber.cs | 1 + 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/AirBomber/AirBomber/DrawningAirBomber.cs b/AirBomber/AirBomber/DrawningAirBomber.cs index 50ea92b..f18461c 100644 --- a/AirBomber/AirBomber/DrawningAirBomber.cs +++ b/AirBomber/AirBomber/DrawningAirBomber.cs @@ -4,6 +4,7 @@ using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; +using AirBomber; namespace AirBomber { @@ -16,9 +17,8 @@ namespace AirBomber /// Вес /// Основной цвет /// Дополнительный цвет - /// Признак наличия обвеса - /// Признак наличия антикрыла - /// Признак наличия гоночной полосы + /// Признак наличия обвеса + /// Признак наличия антикрыла /// Ширина картинки /// Высота картинки public DrawningAirBomber(int speed, double weight, Color bodyColor, Color @@ -28,17 +28,18 @@ namespace AirBomber { if (EntityAirPlane != null) { - EntityAirPlane = new EntityAirBomber(speed, weight, bodyColor, additionalColor, bombs, fuelTanks); + EntityAirPlane = new EntityAirBomber(speed, weight, bodyColor, additionalColor, bombs, bombsColor, fuelTanks); } } public override void DrawPlane(Graphics g) { - if (EntityAirPlane is not EntityAirPlane airBomber) + if (EntityAirPlane is not EntityAirBomber airBomber) { return; } Pen pen = new(Color.Black); Brush additionalBrush = new SolidBrush(airBomber.AdditionalColor); + Brush bombsColor = new SolidBrush(airBomber.BombsColor); base.DrawPlane(g); // обвесы if (airBomber.Bombs) diff --git a/AirBomber/AirBomber/DrawningAirPlane.cs b/AirBomber/AirBomber/DrawningAirPlane.cs index 982df68..f746d98 100644 --- a/AirBomber/AirBomber/DrawningAirPlane.cs +++ b/AirBomber/AirBomber/DrawningAirPlane.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using AirBomber; namespace AirBomber { diff --git a/AirBomber/AirBomber/EntityAirBomber.cs b/AirBomber/AirBomber/EntityAirBomber.cs index e1a1f81..5a1c723 100644 --- a/AirBomber/AirBomber/EntityAirBomber.cs +++ b/AirBomber/AirBomber/EntityAirBomber.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using AirBomber; namespace AirBomber {