From d8ef35943127a21f1d8c165de1216b1b12df377f Mon Sep 17 00:00:00 2001 From: artur-kalimullin <144933634+artur-kalimullin@users.noreply.github.com> Date: Wed, 10 Apr 2024 20:43:46 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A7=D0=B8=D1=81=D1=82=D0=BE=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectAirFighter/src/DrawningAirFighter.java | 6 ------ ProjectAirFighter/src/DrawningAirFighterEngine.java | 3 +-- ProjectAirFighter/src/EngineCount.java | 1 - ProjectAirFighter/src/EntityAirFighter.java | 2 -- 4 files changed, 1 insertion(+), 11 deletions(-) diff --git a/ProjectAirFighter/src/DrawningAirFighter.java b/ProjectAirFighter/src/DrawningAirFighter.java index 380252f..04e62c5 100644 --- a/ProjectAirFighter/src/DrawningAirFighter.java +++ b/ProjectAirFighter/src/DrawningAirFighter.java @@ -3,11 +3,9 @@ import java.util.Random; public class DrawningAirFighter { private EntityAirFighter entityAirFighter; - public EntityAirFighter getEntityAirFighter() { return entityAirFighter; } - private Integer _pictureWidth; private Integer _pictureHeight; private Integer _startPosX; @@ -83,8 +81,6 @@ public class DrawningAirFighter { return true; default: return false; - - } } @@ -223,8 +219,6 @@ public class DrawningAirFighter { } drawningAirFighterEngine.drawAirFighterEngine(g, entityAirFighter.getAdditionalColor(), _startPosX, _startPosY); - - } } diff --git a/ProjectAirFighter/src/DrawningAirFighterEngine.java b/ProjectAirFighter/src/DrawningAirFighterEngine.java index 2073269..010d7df 100644 --- a/ProjectAirFighter/src/DrawningAirFighterEngine.java +++ b/ProjectAirFighter/src/DrawningAirFighterEngine.java @@ -2,7 +2,6 @@ import java.awt.*; public class DrawningAirFighterEngine { private EngineCount engineCount; - public void setEnumNumber(int wheelCount) { for (EngineCount value : EngineCount.values()) { if (value.getEnumNumber() == wheelCount) { @@ -11,11 +10,11 @@ public class DrawningAirFighterEngine { } } } - public void drawAirFighterEngine(Graphics g, Color color, float startPosX, float startPosY) { Graphics2D g2d = (Graphics2D) g; g2d.setColor(color); g2d.setStroke(new BasicStroke(4)); + if (engineCount.getEnumNumber() == 2){ g2d.drawRect((int)startPosX + 30, (int) startPosY + 69, 10, 2 ); g2d.drawRect((int)startPosX + 30, (int) startPosY + 3, 10, 2 ); diff --git a/ProjectAirFighter/src/EngineCount.java b/ProjectAirFighter/src/EngineCount.java index e30aaf3..ed59643 100644 --- a/ProjectAirFighter/src/EngineCount.java +++ b/ProjectAirFighter/src/EngineCount.java @@ -2,7 +2,6 @@ public enum EngineCount { Two(2), Three(4), Four(6); - final private int EnumNumber; EngineCount(int enumNumber) { EnumNumber = enumNumber; diff --git a/ProjectAirFighter/src/EntityAirFighter.java b/ProjectAirFighter/src/EntityAirFighter.java index bb4d44d..776b2c0 100644 --- a/ProjectAirFighter/src/EntityAirFighter.java +++ b/ProjectAirFighter/src/EntityAirFighter.java @@ -17,8 +17,6 @@ public class EntityAirFighter { public Color getAdditionalColor() { return AdditionalColor; } - - public double Step() { return Speed*100/Weight; }