From 968bae0c5b55bfa69b0f883f72a1cb97259dde52 Mon Sep 17 00:00:00 2001 From: devil_1nc Date: Thu, 20 Oct 2022 23:42:10 +0400 Subject: [PATCH] First commit --- DrawingPlane.java | 2 +- FormPlane.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DrawingPlane.java b/DrawingPlane.java index 3d3438a..f8c45b2 100644 --- a/DrawingPlane.java +++ b/DrawingPlane.java @@ -13,7 +13,7 @@ public class DrawingPlane { private final int _planeWidth = 125; private final int _planeHeight = 45; - public void Init(int speed, float weight, Color bodyColor, int ilNum, EntityPlane entity) + public void Init(int speed, float weight, Color bodyColor, EntityPlane entity) { Plane = new EntityPlane(); Plane.Init(speed, weight, bodyColor); diff --git a/FormPlane.java b/FormPlane.java index d2f6332..7bcf85e 100644 --- a/FormPlane.java +++ b/FormPlane.java @@ -12,7 +12,7 @@ public class FormPlane extends JComponent { JFrame formFrame = new JFrame("Plane"); formFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - formFrame.setSize(840, 560); + formFrame.setSize(920, 560); formFrame.setVisible(true); formFrame.setLocationRelativeTo(null); @@ -50,7 +50,7 @@ public class FormPlane extends JComponent Random rand = new Random(); _plane = new DrawingPlane(); _entity = new EntityPlane(); - _plane.Init(300 + rand.nextInt( 100), 1000 + rand.nextInt(1000), Color.getHSBColor(rand.nextInt(256), rand.nextInt(256), rand.nextInt(256)), rand.nextInt(3), _entity); + _plane.Init(300 + rand.nextInt( 100), 1000 + rand.nextInt(1000), Color.getHSBColor(rand.nextInt(256), rand.nextInt(256), rand.nextInt(256)), _entity); _plane.SetPosition(10 + rand.nextInt(90), 10 + rand.nextInt(90), formFrame.getWidth(), formFrame.getHeight() - 75); speedLabel.setText("Speed: " + _plane.Plane.getSpeed()); weightLabel.setText("Weight: " + (int)_plane.Plane.getWeight());