diff --git a/src/CameluoCababas.java b/src/CameluoCababas.java index eeca1b6..7dfecce 100644 --- a/src/CameluoCababas.java +++ b/src/CameluoCababas.java @@ -86,7 +86,7 @@ public void jump() { goal = new Point( getX() + (jumpMod * JUMP_LENGTH), - (int)(frameSize.getHeight() - (frameSize.getHeight()/2)) + (int)(frameSize.getHeight() - getHeight()) ); absoluteX = getX(); @@ -151,7 +151,7 @@ private double calculateQuadraticY(double currentX, double startingX, double goa } private double calculateDimension() { - return (frameSize.getHeight()/2); + return (frameSize.getWidth() * 0.12); } @Override @@ -174,7 +174,7 @@ public void actionPerformed(ActionEvent e) { 0, JUMP_LENGTH, goal.getY(), - 0, + goal.getY() - (calculateDimension() * 0.75), false ); absoluteHeight = calculateQuadraticY( @@ -182,7 +182,7 @@ public void actionPerformed(ActionEvent e) { 0, JUMP_LENGTH, startingHeight, - (calculateDimension()*1.25), + (calculateDimension()*1.1), false ); diff --git a/src/Launcher.java b/src/Launcher.java index d08519f..82ec00b 100644 --- a/src/Launcher.java +++ b/src/Launcher.java @@ -21,7 +21,9 @@ public Launcher() { setLayout(null); setBackground(new Color(0, 0, 0, 0)); getContentPane().setBackground(new Color(0, 0, 0, 0)); - setSize((int)(screenSize.getWidth()), (int)(screenSize.getHeight()*0.4)); + setSize( + screenSize + ); setLocation(0, (int)(screenSize.getHeight() - getHeight())); setAlwaysOnTop(true); setDefaultCloseOperation(EXIT_ON_CLOSE); @@ -84,7 +86,7 @@ public void run() { public void run() { while (!Thread.currentThread().isInterrupted()) { try { - Thread.sleep((long) (Math.random() * 2000) + 2000); + Thread.sleep((long) (Math.random() * 2000) + 3000); cababas.jump(); } catch (InterruptedException e) { throw new RuntimeException(e);