From f5cb1bfbe2dd08fb483e6dba60d2977ab19ca594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BD=D0=B8=D1=8F=D1=80=20=D0=90=D0=B3=D0=BB?= =?UTF-8?q?=D0=B8=D1=83=D0=BB=D0=BB=D0=BE=D0=B2?= Date: Wed, 14 Sep 2022 15:17:29 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BA=D0=BE=D0=BD=D1=81=D1=82=D1=80=D1=83?= =?UTF-8?q?=D0=BA=D1=82=D1=83=D1=80=D0=BE=D0=B2=20=D0=B2=D0=BC=D0=B5=D1=81?= =?UTF-8?q?=D1=82=D0=BE=20=D0=BC=D0=B5=D1=82=D0=BE=D0=B4=D0=BE=D0=B2=20Ini?= =?UTF-8?q?t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AirBomber/AirBomber/DrawningAirplane.cs | 5 ++--- AirBomber/AirBomber/EntityAirplane.cs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/AirBomber/AirBomber/DrawningAirplane.cs b/AirBomber/AirBomber/DrawningAirplane.cs index 9d73ff9..b86cee0 100644 --- a/AirBomber/AirBomber/DrawningAirplane.cs +++ b/AirBomber/AirBomber/DrawningAirplane.cs @@ -39,10 +39,9 @@ /// Скорость /// Вес самолета /// Цвет обшивки - public void Init(int speed, float weight, Color bodyColor) + public DrawningAirplane(int speed, float weight, Color bodyColor) { - Airplane = new EntityAirplane(); - Airplane.Init(speed, weight, bodyColor); + Airplane = new EntityAirplane(speed, weight, bodyColor); } /// /// Установка позиции самолета diff --git a/AirBomber/AirBomber/EntityAirplane.cs b/AirBomber/AirBomber/EntityAirplane.cs index bd6810f..2869683 100644 --- a/AirBomber/AirBomber/EntityAirplane.cs +++ b/AirBomber/AirBomber/EntityAirplane.cs @@ -28,7 +28,7 @@ /// /// /// - public void Init(int speed, float weight, Color bodyColor) + public EntityAirplane(int speed, float weight, Color bodyColor) { Random rnd = new(); Speed = speed <= 0 ? rnd.Next(50, 150) : speed;