问题
Could anyone explain exactly what this method does in AndEngine?
runOnUpdateThread(new Runnable() {
@Override
// to safely detach and re-attach the sprites
public void run() {
}
});
EDIT:
To be more specific, the runOnUpdateThread in general
回答1:
This is an Engine method that executes the Runnable when the engine is updating the scene. All scene updates must happen on the update thread (just as all rendering must happen on the UI thread). This method can be used from outside the update thread to make a change to the contents of the scene.
来源:https://stackoverflow.com/questions/8889610/runonupdatethread-in-andengine