14.06.2011

state-functions

posted by Karsten

/* * Activity state functions */ @Override protected void onPause() { super.onPause(); if(mGameThread.getMode() == GameThread.STATE_RUNNING) { mGameThread.setState(GameThread.STATE_PAUSE); } } @Override protected void onDestroy() { super.onDestroy(); mGameView.cleanup(); mGameView.removeSensor((SensorManager)getSystemService(Context.SENSOR_SERVICE)); mGameThread = null; mGameView = null; } @Override protected void onSaveInstanceState(Bundle outState) { // just have the View's thread save its state into our Bundle super.onSaveInstanceState(outState); if(mGameThread != null) { mGameThread.saveState(outState); } }

Share

Place your comment

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