runOnUpdateThread在andengine [英] runOnUpdateThread in andengine

查看:231
本文介绍了runOnUpdateThread在andengine的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能解释一下到底是什么这种方法确实在AndEngine?

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() {

}


});

编辑:

要更具体地,所述runOnUpdateThread一般

To be more specific, the runOnUpdateThread in general

推荐答案

这是当发动机更新现场执行Runnable的引擎方法。所有场景更新必须发生在更新线程(就像所有的渲染必须发生在UI线程)。这种方法可以从更新线程之外使用做出改变到场景中的内容。

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.

这篇关于runOnUpdateThread在andengine的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆