14.06.2011

gameloop

posted by Karsten

@Override public void run() { Canvas canvasRun; while (mRun) { canvasRun = null; try { canvasRun = mSurfaceHolder.lockCanvas(null); synchronized (mSurfaceHolder) { if (mMode == STATE_RUNNING) { updatePhysics(); } doDraw(canvasRun); } } finally { if (canvasRun != null) { if(mSurfaceHolder != null) mSurfaceHolder.unlockCanvasAndPost(canvasRun); } } } }

Share

Place your comment

Please fill your data and comment below.
Name
Email
Website
Your comment