private void start() { while (true) { ball.accelerate(); ball.interact(paddle); ball.move(); if (ball.isReachToButtom()) { System.out.println("Game Over!"); break; } repaint(); try { Thread.sleep(INTERVAL); } catch (InterruptedException e) { e.printStackTrace(); } } }
private void updatePhysics() { b.accelerate(dTime, gravX, gravY); }