From e0594daa14b1a1bf1cd9a4c779d39cfa5f34d5c8 Mon Sep 17 00:00:00 2001 From: Lenz Date: Mon, 8 Jun 2020 19:02:06 +0200 Subject: [PATCH] delaytimer gefixt --- bin/Game.class | Bin 9782 -> 9830 bytes src/Game.java | 11 ++++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/Game.class b/bin/Game.class index e00d09613a915e90cb2b8f6d2e9d297ca25b4f6f..65111ec5b7dea96a44920d3a186a4be6e34ca7dc 100644 GIT binary patch literal 9830 zcma)C31C#!6+L(6&-___W(Jag0t$j634|yrqKL9XAVQR|D=`83la-@j1~$awofWkwefT^)kt(t04e-71;rQ*$;L)b zVEQCZlrvk*8Tb+nP3d)<%_0(>mTXL>Pp4_aY||X)&q+7a%VSICQNW~BT_OZ8N-P|M zQkplcWL^-05f*x*P|7MB3)3>R~008{%uzI zl&VTx>O$9N-NYsHOq_M#4D8JqLX|UvY6~U;Cg@wAz5R4r3oL|Tnc#|e7cX99;v6oG zvtvV8>@Y615JbpC{6P8kE>bDA7W(2a6Wpo3N^ZNB5b98(npav#;yenE*VPG1^X#6K zYG_I|CK}UY^Jd-+3}G4SEi{0eD9G7QOs#ILfO{^GPC5HYH(7pcuEz~@imkMfbMBqzVU^3Hq!aw6g+3_O9d(n1 zn{f-L$OW01SXY^BNhcch^bgGAOswI$l;@!-MwxH3a69gB^l5;gPq-Wo?k)=(6&I#0 z*$AOLcU#zudo+9{(({rn$(nky8N(Kp%nRUNisDfzJ2T#>r1x8R07K~ql2#|v^*sLL zu+_r1m0yp**@>3q1#wDHM4N^0;32_bL`+UBkFTyzPpVI~BxW}yn(g?cYFy(Uv9Jw~ za@M4!lR4$I9*%DBI&0mSjwk61ceamP_%5Cx6OU;Rrat+HRWS}%2v4HZM2CA!%6rJP zkim9mD_6$XrB-vT`saDvfzc0)CaPce;`c0k-`;l10l=l@2Kh>CQGJQ2MVr#5;PQU7d#J*KNaV*<9rZbsGNUm0JUipKtW%iK7=o^-^5ov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%0WQs1Lu};a8F7)iolVdQ@Jr z&oy}Sv-DsaoQuXJ=%J?>4ZhWO(H=8X@h^Coj1Iv;zlEEA2QU4>@QfkG&Al(_8Sv2~ zoW=OApLhLH&LN6nQU3K-u||7T{t*|yU$o|4#BL+k{`zpfi>cn?&#ArS?8kX*lhnup jY&_uyJlWy2iS*P&Iz2}6;(+Psadrh8uj>hed+)yiZqT)_ diff --git a/src/Game.java b/src/Game.java index 949764e..7646427 100644 --- a/src/Game.java +++ b/src/Game.java @@ -29,7 +29,7 @@ public class Game { private JLabel fpsLabel; private JLabel liveLabels[]; - private long delaytimer = 4000; + private int delaytimer = 4; @SuppressWarnings("unused") private long fps = 60; @@ -457,24 +457,25 @@ public class Game { fps = 1000000000 / dt; // Berechnen der fps if (frames > 100) { if (fps > 200) { - delaytimer += 100; + delaytimer++; } else if (fps < 180) { - delaytimer -= 100; + delaytimer--; } } } delay(delaytimer); // delay ist wichtig, um die geschwindigkeit der objekte und die fps zu // kontrollieren + System.out.println(delaytimer); } // ENDE DES MAIN-LOOPS } // Methode zum verzögern (warten) in ms - public void delay(long time) { + public void delay(int time) { try { - Thread.sleep(0, (int) time); + Thread.sleep(time); } catch (InterruptedException e) { e.printStackTrace(); }