First commit

This commit is contained in:
devil_1nc 2022-10-20 23:42:10 +04:00
parent d36395cda6
commit 968bae0c5b
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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());