/** * Main update code (We don't want any allocations happening anywhere in the main loop). * * @param delta The amount of time that has passed since the previous update */ public void update(float delta) { float[] paddleCenterY = {mTouchLocs[0].y, mTouchLocs[1].y}; if (!mPaused) { mGameLogic.update(delta, paddleCenterY); mGameLogic.updateBallSprite(mBall); mGameLogic.updatePaddleSprites(mPaddles); } else if (mStartNextRound) { mGameLogic.initRound(); mPaused = false; mStartNextRound = false; } }