我需要一些關於如何或某些代碼示例或與此相關的任何想法。AdnEngine粒子系統多少個粒子更新
我已經取得了一些粒子系統,那麼我在這裏將從例如薩科
final SpriteParticleSystem particleSystem = new SpriteParticleSystem(new PointParticleEmitter(-32, ParticleSystemNexusExample.CAMERA_HEIGHT - 32),
ParticleSystemNexusExample.RATE_MIN,
ParticleSystemNexusExample.RATE_MAX,
ParticleSystemNexusExample.PARTICLES_MAX,
this.mParticleTextureRegion, this.getVertexBufferObjectManager());
什麼,我需要的是「活」的更新變量
private static final float RATE_MIN = 5;
private static final float RATE_MAX = 8;
private static int PARTICLES_MAX = 16;
這裏顯示的是該變種從以前的代碼
ParticleSystemNexusExample.RATE_MIN
ParticleSystemNexusExample.RATE_MAX
ParticleSystemNexusExample.PARTICLES_MAX
它在某種程度上possbile? 有可能以某種方式重新啓動粒子系統。 好吧重新啓動它不是100%「實時」更新系統,但我需要像使用設置一樣留在應用程序中,當你退出設置時它會得到新的變量。
Basicly我有onCreateScene
的ParticleSystem();
我使用公共無效ParticleSystem()
{}
而且可能要重新啓動嗎?
好吧,試着用scene.deatachChildren();之後我用設置中的新值附加它。這可以嗎? detachChildren();將破壞舊的粒子系統並創建新的權利? – Allen
分離只是從場景中刪除它。你只應該確保你在引擎更新線程上調用它。 –
那麼我用它updatethread是的,在新的值附加後,deatach。好嗎? – Allen