public ConfigurableEmitter duplicate ( ) { ConfigurableEmitter theCopy = null ; try { ByteArrayOutputStream bout = new ByteArrayOutputStream ( ) ; ParticleIO . saveEmitter ( bout , this ) ; ByteArrayInputStream bin = new ByteArrayInputStream ( bout . toByteArray ( ) ) ; theCopy = ParticleIO . loadEmitter ( bin ) ; } catch ( IOException e ) { Log . error ( "Slick: ConfigurableEmitter.duplicate(): caught exception " + e . toString ( ) ) ; return null ; } return theCopy ; }
Create a duplicate of this emitter . The duplicate should be added to a ParticleSystem to be used .