public void draw(Renderer r) { Camera camera = r.getCamera(); if (needUpdateVerts || !orientation.equals(camera.getDirection())) { for (int i = 0; i < particles.length; i++) { Particle particle = particles[i]; if (particle.status == Particle.ALIVE) { particle.updateVerts(camera); } } orientation.set(camera.getDirection()); needUpdateVerts = false;
public void draw( Renderer r ) { if (isActive()) { Camera camera = r.getCamera(); for (int i = 0; i < particles.length; i++) { Particle particle = particles[i]; if (particle.status == Particle.ALIVE) { particle.updateVerts(camera); } }  particlesGeometry.setVertices(geometryCoordinates); particlesGeometry.setColors(appearanceColors);
            public void draw(Renderer r) {                Camera camera = r.getCamera();                if (needUpdateVerts                        || !orientation.equals(camera.getDirection())) {                    for (int i = 0; i < particles.length; i++) {                        Particle particle = particles[i];                        if (particle.status == Particle.ALIVE) {                            particle.updateVerts(camera);                        }                    }                    orientation.set(camera.getDirection());                    needUpdateVerts = false;                }                super.draw(r);            }