protected JPanel getPanel (ParticleBatch renderer) { if(renderer instanceof PointSpriteParticleBatch){ return new EmptyPanel(this, "Point Sprite Batch", "It renders particles as point sprites."); } if(renderer instanceof BillboardParticleBatch){ return new BillboardBatchPanel(this, (BillboardParticleBatch) renderer); } else if(renderer instanceof ModelInstanceParticleBatch){ return new EmptyPanel(this, "Model Instance Batch", "It renders particles as model instances."); } return null; }
public Particles() { inst = this; system = ParticleSystem.get(); PointSpriteParticleBatch psBatch = new PointSpriteParticleBatch(); psBatch.setCamera(View.inst.getCamera()); system.add(psBatch); Assets.loadParticleEffects(system); ParticleEffect bulletHit = Assets.manager.get("particle/bullet-hit.pfx"); ParticleEffect blueExplosion = Assets.manager.get("particle/blue-explosion.pfx"); bulletHitPool = new PFXPool(bulletHit); blueExplosionPool = new PFXPool(blueExplosion); }
public PointSpriteRenderer(PointSpriteParticleBatch batch){ this(); setBatch(batch); }
@Override public boolean isCompatible (ParticleBatch<?> batch) { return batch instanceof PointSpriteParticleBatch; }
public PointSpriteParticleBatch getPointSpriteBatch () { return renderer.pointSpriteBatch; }