runOnUpdateThread in andengine

二次信任 提交于 2019-12-11 13:45:58

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!