libGDX Null Pointer尝试渲染粒子系统时抛出异常

时间:2016-06-16 14:21:27

标签: java android opengl-es libgdx

所以我试图在我的游戏中使用粒子效果,但是,当我运行它时,它会引发以下异常:

  

06-16 15:10:46.585 9136-10049 / pt.bluecover.wearable3d   E / AndroidRuntime:致命异常:GLThread 78458                                                                           处理:pt.bluecover.wearable3d,PID:9136                                                                           java.lang.NullPointerException:尝试从字段读取   ' com.badlogic.gdx.graphics.g3d.particles.ParallelArray   com.badlogic.gdx.graphics.g3d.particles.ParticleController.particles'   在null对象引用上                                                                               在   com.badlogic.gdx.graphics.g3d.particles.emitters.Emitter.end(Emitter.java:33)                                                                               在   com.badlogic.gdx.graphics.g3d.particles.ParticleController.end(ParticleController.java:184)                                                                               在   com.badlogic.gdx.graphics.g3d.particles.ParticleController.reset(ParticleController.java:176)                                                                               在   com.badlogic.gdx.graphics.g3d.particles.ParticleEffect.reset(ParticleEffect.java:64)                                                                               在com.mygdx.game.WristPlotter.create(WristPlotter.java:126)                                                                               在   com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:290)                                                                               在   android.opengl.GLSurfaceView $ GLThread.guardedRun(GLSurfaceView.java:1550)                                                                               在android.opengl.GLSurfaceView $ GLThread.run(GLSurfaceView.java:1278)

但是,我目前正在学习本教程,我相信我的所有内容都相同:3D Particle Systems - LibGDX

那么,可能出现什么问题?这是代码:

docker-compose

无论如何,提前谢谢!

编辑:有人将此标记为"什么是空指针异常以及如何修复它#34;的副本。嗯,这不是。这个问题对Null Pointer Exceptions进行了一般性处理。这个是指使用这个特定的库libGDX,我在哪里没有添加一些可能导致粒子系统中存储粒子的数据结构没有我先前加载的粒子效果的东西...

0 个答案:

没有答案