document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. /* Ball */
  2. final Rectangle ball = new Rectangle(0, 0, 20, 20) {
  3. @Override
  4. protected void onManagedUpdate(float pSecondsElapsed) {
  5. if (this.mY < -GAME_HEIGHT_HALF) {    this.setVelocityY(BALL_VELOCITY);   } else if (this.mY + this.getHeight() > GAME_HEIGHT_HALF) {
  6. this.setVelocityY(-BALL_VELOCITY);
  7. }
  8. super.onManagedUpdate(pSecondsElapsed);
  9. }
  10. };
');